Colonna colonna unica

public class ReportSummary { public void CreateHeader() { var header = new List<KeyValuePair<string, string>> { new KeyValuePair<string, string>("Description", "Summary By Role*"), new KeyValuePair<string, string>("ColName1" , "Public"), new KeyValuePair<string, string>("ColName2" , "Non Public"), new KeyValuePair<string, string>("ColName3" , "Public"), new KeyValuePair<string, string>("ColName4" , "Non Public"), new KeyValuePair<string, string>("ColName5" , "Public"), new KeyValuePair<string, string>("ColName6" , "Non Public"), new KeyValuePair<string, string>("ColName7" , "Public"), new KeyValuePair<string, string>("ColName8" , "Non Public"), new KeyValuePair<string, string>("ColName9" , "Public"), new KeyValuePair<string, string>("ColName10" , "Non Public"), new KeyValuePair<string, string>("ColName11" , "Public"), new KeyValuePair<string, string>("ColName12" , "Non Public") }; for (int index = 0; index < header.Count; index++) { row[index] = header[index].Value; } AddRow(_currentRow, row, rowStyleIndex); } void AddRow(int rowIndex, object[] cells, params int[] styleIndexes) { if (cells != null) { for (int columnIndex = 0; columnIndex < cells.Length; columnIndex++) { int styleIndex = 16; //If style idex is defined, pass it, or else pass the default style index 16, which is a bold header with white background if (styleIndexes != null) { styleIndex = styleIndexes[columnIndex]; } AddCell((uint)rowIndex, columnIndex + 1, cells[columnIndex], styleIndex); } } } }` 

class ExcelProcessor:

 public class ExcelProcessor2010 { protected Cell AddCell(uint rowIndex, int columnIndex, object cellValue, int styleIndex) { //Removing the values for the Greyed out cell and Empty cell if (string.IsNullOrEmpty(Convert.ToString(cellValue)) || styleIndex == 33) { cellValue = " "; } Cell cell = AddCell(rowIndex, columnIndex, cellValue); cell.StyleIndex = (uint)styleIndex; return cell; } protected Cell AddCell(uint rowIndex, int columnIndex, object cellValue) { Cell cell = null; if (cellValue != null) { string cellValueAsString = cellValue.ToString(); if (!string.IsNullOrEmpty(cellValueAsString)) { cell = InsertCellInWorksheet(GetColumnName(columnIndex), rowIndex); if ((cellValue is bool || cellValue is bool?)) { cell.DataType = CellValues.Boolean; } else if (cellValue is DateTime || cellValue is DateTime?) { cell.DataType = CellValues.Date; } else if (cellValue is string && !string.IsNullOrEmpty((string)cellValue)) { cell.DataType = CellValues.SharedString; } else if (cellValue is byte || cellValue is byte? || cellValue is sbyte || cellValue is sbyte? || cellValue is short || cellValue is short? || cellValue is ushort || cellValue is ushort? || cellValue is int || cellValue is int? || cellValue is uint || cellValue is uint? || cellValue is long || cellValue is long? || cellValue is ulong || cellValue is ulong? || cellValue is float || cellValue is float? || cellValue is double || cellValue is double? || cellValue is decimal || cellValue is decimal? ) { cell.DataType = CellValues.Number; } if (cell.CellValue == null) { cell.Append(new CellValue { Text = cell.DataType != CellValues.SharedString ? cellValueAsString : InsertSharedStringItem(cellValueAsString) }); } else { cell.CellValue.Text = cellValueAsString; } } } return cell; } protected string InsertSharedStringItem(string text) { // If the part does not contain a SharedStringTable, create one. if (SharedStringTablePart.SharedStringTable == null) { SharedStringTablePart.SharedStringTable = new SharedStringTable(); } int i = 0; // Iterate through all the items in the SharedStringTable. If the text already exists, return its index. foreach (SharedStringItem item in SharedStringTablePart.SharedStringTable.Elements<SharedStringItem>()) { if (item.InnerText == text) { return i.ToString(); } i++; } // The text does not exist in the part. Create the SharedStringItem and return its index. SharedStringTablePart.SharedStringTable.AppendChild(new SharedStringItem(new Text(text))); //SharedStringTablePart.SharedStringTable.Save(); return i.ToString(); } } cella di return; public class ExcelProcessor2010 { protected Cell AddCell(uint rowIndex, int columnIndex, object cellValue, int styleIndex) { //Removing the values for the Greyed out cell and Empty cell if (string.IsNullOrEmpty(Convert.ToString(cellValue)) || styleIndex == 33) { cellValue = " "; } Cell cell = AddCell(rowIndex, columnIndex, cellValue); cell.StyleIndex = (uint)styleIndex; return cell; } protected Cell AddCell(uint rowIndex, int columnIndex, object cellValue) { Cell cell = null; if (cellValue != null) { string cellValueAsString = cellValue.ToString(); if (!string.IsNullOrEmpty(cellValueAsString)) { cell = InsertCellInWorksheet(GetColumnName(columnIndex), rowIndex); if ((cellValue is bool || cellValue is bool?)) { cell.DataType = CellValues.Boolean; } else if (cellValue is DateTime || cellValue is DateTime?) { cell.DataType = CellValues.Date; } else if (cellValue is string && !string.IsNullOrEmpty((string)cellValue)) { cell.DataType = CellValues.SharedString; } else if (cellValue is byte || cellValue is byte? || cellValue is sbyte || cellValue is sbyte? || cellValue is short || cellValue is short? || cellValue is ushort || cellValue is ushort? || cellValue is int || cellValue is int? || cellValue is uint || cellValue is uint? || cellValue is long || cellValue is long? || cellValue is ulong || cellValue is ulong? || cellValue is float || cellValue is float? || cellValue is double || cellValue is double? || cellValue is decimal || cellValue is decimal? ) { cell.DataType = CellValues.Number; } if (cell.CellValue == null) { cell.Append(new CellValue { Text = cell.DataType != CellValues.SharedString ? cellValueAsString : InsertSharedStringItem(cellValueAsString) }); } else { cell.CellValue.Text = cellValueAsString; } } } return cell; } protected string InsertSharedStringItem(string text) { // If the part does not contain a SharedStringTable, create one. if (SharedStringTablePart.SharedStringTable == null) { SharedStringTablePart.SharedStringTable = new SharedStringTable(); } int i = 0; // Iterate through all the items in the SharedStringTable. If the text already exists, return its index. foreach (SharedStringItem item in SharedStringTablePart.SharedStringTable.Elements<SharedStringItem>()) { if (item.InnerText == text) { return i.ToString(); } i++; } // The text does not exist in the part. Create the SharedStringItem and return its index. SharedStringTablePart.SharedStringTable.AppendChild(new SharedStringItem(new Text(text))); //SharedStringTablePart.SharedStringTable.Save(); return i.ToString(); } } cella di return; public class ExcelProcessor2010 { protected Cell AddCell(uint rowIndex, int columnIndex, object cellValue, int styleIndex) { //Removing the values for the Greyed out cell and Empty cell if (string.IsNullOrEmpty(Convert.ToString(cellValue)) || styleIndex == 33) { cellValue = " "; } Cell cell = AddCell(rowIndex, columnIndex, cellValue); cell.StyleIndex = (uint)styleIndex; return cell; } protected Cell AddCell(uint rowIndex, int columnIndex, object cellValue) { Cell cell = null; if (cellValue != null) { string cellValueAsString = cellValue.ToString(); if (!string.IsNullOrEmpty(cellValueAsString)) { cell = InsertCellInWorksheet(GetColumnName(columnIndex), rowIndex); if ((cellValue is bool || cellValue is bool?)) { cell.DataType = CellValues.Boolean; } else if (cellValue is DateTime || cellValue is DateTime?) { cell.DataType = CellValues.Date; } else if (cellValue is string && !string.IsNullOrEmpty((string)cellValue)) { cell.DataType = CellValues.SharedString; } else if (cellValue is byte || cellValue is byte? || cellValue is sbyte || cellValue is sbyte? || cellValue is short || cellValue is short? || cellValue is ushort || cellValue is ushort? || cellValue is int || cellValue is int? || cellValue is uint || cellValue is uint? || cellValue is long || cellValue is long? || cellValue is ulong || cellValue is ulong? || cellValue is float || cellValue is float? || cellValue is double || cellValue is double? || cellValue is decimal || cellValue is decimal? ) { cell.DataType = CellValues.Number; } if (cell.CellValue == null) { cell.Append(new CellValue { Text = cell.DataType != CellValues.SharedString ? cellValueAsString : InsertSharedStringItem(cellValueAsString) }); } else { cell.CellValue.Text = cellValueAsString; } } } return cell; } protected string InsertSharedStringItem(string text) { // If the part does not contain a SharedStringTable, create one. if (SharedStringTablePart.SharedStringTable == null) { SharedStringTablePart.SharedStringTable = new SharedStringTable(); } int i = 0; // Iterate through all the items in the SharedStringTable. If the text already exists, return its index. foreach (SharedStringItem item in SharedStringTablePart.SharedStringTable.Elements<SharedStringItem>()) { if (item.InnerText == text) { return i.ToString(); } i++; } // The text does not exist in the part. Create the SharedStringItem and return its index. SharedStringTablePart.SharedStringTable.AppendChild(new SharedStringItem(new Text(text))); //SharedStringTablePart.SharedStringTable.Save(); return i.ToString(); } } // Se la parte non contiene SharedStringTable, crea uno. public class ExcelProcessor2010 { protected Cell AddCell(uint rowIndex, int columnIndex, object cellValue, int styleIndex) { //Removing the values for the Greyed out cell and Empty cell if (string.IsNullOrEmpty(Convert.ToString(cellValue)) || styleIndex == 33) { cellValue = " "; } Cell cell = AddCell(rowIndex, columnIndex, cellValue); cell.StyleIndex = (uint)styleIndex; return cell; } protected Cell AddCell(uint rowIndex, int columnIndex, object cellValue) { Cell cell = null; if (cellValue != null) { string cellValueAsString = cellValue.ToString(); if (!string.IsNullOrEmpty(cellValueAsString)) { cell = InsertCellInWorksheet(GetColumnName(columnIndex), rowIndex); if ((cellValue is bool || cellValue is bool?)) { cell.DataType = CellValues.Boolean; } else if (cellValue is DateTime || cellValue is DateTime?) { cell.DataType = CellValues.Date; } else if (cellValue is string && !string.IsNullOrEmpty((string)cellValue)) { cell.DataType = CellValues.SharedString; } else if (cellValue is byte || cellValue is byte? || cellValue is sbyte || cellValue is sbyte? || cellValue is short || cellValue is short? || cellValue is ushort || cellValue is ushort? || cellValue is int || cellValue is int? || cellValue is uint || cellValue is uint? || cellValue is long || cellValue is long? || cellValue is ulong || cellValue is ulong? || cellValue is float || cellValue is float? || cellValue is double || cellValue is double? || cellValue is decimal || cellValue is decimal? ) { cell.DataType = CellValues.Number; } if (cell.CellValue == null) { cell.Append(new CellValue { Text = cell.DataType != CellValues.SharedString ? cellValueAsString : InsertSharedStringItem(cellValueAsString) }); } else { cell.CellValue.Text = cellValueAsString; } } } return cell; } protected string InsertSharedStringItem(string text) { // If the part does not contain a SharedStringTable, create one. if (SharedStringTablePart.SharedStringTable == null) { SharedStringTablePart.SharedStringTable = new SharedStringTable(); } int i = 0; // Iterate through all the items in the SharedStringTable. If the text already exists, return its index. foreach (SharedStringItem item in SharedStringTablePart.SharedStringTable.Elements<SharedStringItem>()) { if (item.InnerText == text) { return i.ToString(); } i++; } // The text does not exist in the part. Create the SharedStringItem and return its index. SharedStringTablePart.SharedStringTable.AppendChild(new SharedStringItem(new Text(text))); //SharedStringTablePart.SharedStringTable.Save(); return i.ToString(); } } int i = 0; public class ExcelProcessor2010 { protected Cell AddCell(uint rowIndex, int columnIndex, object cellValue, int styleIndex) { //Removing the values for the Greyed out cell and Empty cell if (string.IsNullOrEmpty(Convert.ToString(cellValue)) || styleIndex == 33) { cellValue = " "; } Cell cell = AddCell(rowIndex, columnIndex, cellValue); cell.StyleIndex = (uint)styleIndex; return cell; } protected Cell AddCell(uint rowIndex, int columnIndex, object cellValue) { Cell cell = null; if (cellValue != null) { string cellValueAsString = cellValue.ToString(); if (!string.IsNullOrEmpty(cellValueAsString)) { cell = InsertCellInWorksheet(GetColumnName(columnIndex), rowIndex); if ((cellValue is bool || cellValue is bool?)) { cell.DataType = CellValues.Boolean; } else if (cellValue is DateTime || cellValue is DateTime?) { cell.DataType = CellValues.Date; } else if (cellValue is string && !string.IsNullOrEmpty((string)cellValue)) { cell.DataType = CellValues.SharedString; } else if (cellValue is byte || cellValue is byte? || cellValue is sbyte || cellValue is sbyte? || cellValue is short || cellValue is short? || cellValue is ushort || cellValue is ushort? || cellValue is int || cellValue is int? || cellValue is uint || cellValue is uint? || cellValue is long || cellValue is long? || cellValue is ulong || cellValue is ulong? || cellValue is float || cellValue is float? || cellValue is double || cellValue is double? || cellValue is decimal || cellValue is decimal? ) { cell.DataType = CellValues.Number; } if (cell.CellValue == null) { cell.Append(new CellValue { Text = cell.DataType != CellValues.SharedString ? cellValueAsString : InsertSharedStringItem(cellValueAsString) }); } else { cell.CellValue.Text = cellValueAsString; } } } return cell; } protected string InsertSharedStringItem(string text) { // If the part does not contain a SharedStringTable, create one. if (SharedStringTablePart.SharedStringTable == null) { SharedStringTablePart.SharedStringTable = new SharedStringTable(); } int i = 0; // Iterate through all the items in the SharedStringTable. If the text already exists, return its index. foreach (SharedStringItem item in SharedStringTablePart.SharedStringTable.Elements<SharedStringItem>()) { if (item.InnerText == text) { return i.ToString(); } i++; } // The text does not exist in the part. Create the SharedStringItem and return its index. SharedStringTablePart.SharedStringTable.AppendChild(new SharedStringItem(new Text(text))); //SharedStringTablePart.SharedStringTable.Save(); return i.ToString(); } } Se il text esiste già, restituisce il suo indice. public class ExcelProcessor2010 { protected Cell AddCell(uint rowIndex, int columnIndex, object cellValue, int styleIndex) { //Removing the values for the Greyed out cell and Empty cell if (string.IsNullOrEmpty(Convert.ToString(cellValue)) || styleIndex == 33) { cellValue = " "; } Cell cell = AddCell(rowIndex, columnIndex, cellValue); cell.StyleIndex = (uint)styleIndex; return cell; } protected Cell AddCell(uint rowIndex, int columnIndex, object cellValue) { Cell cell = null; if (cellValue != null) { string cellValueAsString = cellValue.ToString(); if (!string.IsNullOrEmpty(cellValueAsString)) { cell = InsertCellInWorksheet(GetColumnName(columnIndex), rowIndex); if ((cellValue is bool || cellValue is bool?)) { cell.DataType = CellValues.Boolean; } else if (cellValue is DateTime || cellValue is DateTime?) { cell.DataType = CellValues.Date; } else if (cellValue is string && !string.IsNullOrEmpty((string)cellValue)) { cell.DataType = CellValues.SharedString; } else if (cellValue is byte || cellValue is byte? || cellValue is sbyte || cellValue is sbyte? || cellValue is short || cellValue is short? || cellValue is ushort || cellValue is ushort? || cellValue is int || cellValue is int? || cellValue is uint || cellValue is uint? || cellValue is long || cellValue is long? || cellValue is ulong || cellValue is ulong? || cellValue is float || cellValue is float? || cellValue is double || cellValue is double? || cellValue is decimal || cellValue is decimal? ) { cell.DataType = CellValues.Number; } if (cell.CellValue == null) { cell.Append(new CellValue { Text = cell.DataType != CellValues.SharedString ? cellValueAsString : InsertSharedStringItem(cellValueAsString) }); } else { cell.CellValue.Text = cellValueAsString; } } } return cell; } protected string InsertSharedStringItem(string text) { // If the part does not contain a SharedStringTable, create one. if (SharedStringTablePart.SharedStringTable == null) { SharedStringTablePart.SharedStringTable = new SharedStringTable(); } int i = 0; // Iterate through all the items in the SharedStringTable. If the text already exists, return its index. foreach (SharedStringItem item in SharedStringTablePart.SharedStringTable.Elements<SharedStringItem>()) { if (item.InnerText == text) { return i.ToString(); } i++; } // The text does not exist in the part. Create the SharedStringItem and return its index. SharedStringTablePart.SharedStringTable.AppendChild(new SharedStringItem(new Text(text))); //SharedStringTablePart.SharedStringTable.Save(); return i.ToString(); } } se (text item.InnerText ==) public class ExcelProcessor2010 { protected Cell AddCell(uint rowIndex, int columnIndex, object cellValue, int styleIndex) { //Removing the values for the Greyed out cell and Empty cell if (string.IsNullOrEmpty(Convert.ToString(cellValue)) || styleIndex == 33) { cellValue = " "; } Cell cell = AddCell(rowIndex, columnIndex, cellValue); cell.StyleIndex = (uint)styleIndex; return cell; } protected Cell AddCell(uint rowIndex, int columnIndex, object cellValue) { Cell cell = null; if (cellValue != null) { string cellValueAsString = cellValue.ToString(); if (!string.IsNullOrEmpty(cellValueAsString)) { cell = InsertCellInWorksheet(GetColumnName(columnIndex), rowIndex); if ((cellValue is bool || cellValue is bool?)) { cell.DataType = CellValues.Boolean; } else if (cellValue is DateTime || cellValue is DateTime?) { cell.DataType = CellValues.Date; } else if (cellValue is string && !string.IsNullOrEmpty((string)cellValue)) { cell.DataType = CellValues.SharedString; } else if (cellValue is byte || cellValue is byte? || cellValue is sbyte || cellValue is sbyte? || cellValue is short || cellValue is short? || cellValue is ushort || cellValue is ushort? || cellValue is int || cellValue is int? || cellValue is uint || cellValue is uint? || cellValue is long || cellValue is long? || cellValue is ulong || cellValue is ulong? || cellValue is float || cellValue is float? || cellValue is double || cellValue is double? || cellValue is decimal || cellValue is decimal? ) { cell.DataType = CellValues.Number; } if (cell.CellValue == null) { cell.Append(new CellValue { Text = cell.DataType != CellValues.SharedString ? cellValueAsString : InsertSharedStringItem(cellValueAsString) }); } else { cell.CellValue.Text = cellValueAsString; } } } return cell; } protected string InsertSharedStringItem(string text) { // If the part does not contain a SharedStringTable, create one. if (SharedStringTablePart.SharedStringTable == null) { SharedStringTablePart.SharedStringTable = new SharedStringTable(); } int i = 0; // Iterate through all the items in the SharedStringTable. If the text already exists, return its index. foreach (SharedStringItem item in SharedStringTablePart.SharedStringTable.Elements<SharedStringItem>()) { if (item.InnerText == text) { return i.ToString(); } i++; } // The text does not exist in the part. Create the SharedStringItem and return its index. SharedStringTablePart.SharedStringTable.AppendChild(new SharedStringItem(new Text(text))); //SharedStringTablePart.SharedStringTable.Save(); return i.ToString(); } } // Il text non esiste nella parte. public class ExcelProcessor2010 { protected Cell AddCell(uint rowIndex, int columnIndex, object cellValue, int styleIndex) { //Removing the values for the Greyed out cell and Empty cell if (string.IsNullOrEmpty(Convert.ToString(cellValue)) || styleIndex == 33) { cellValue = " "; } Cell cell = AddCell(rowIndex, columnIndex, cellValue); cell.StyleIndex = (uint)styleIndex; return cell; } protected Cell AddCell(uint rowIndex, int columnIndex, object cellValue) { Cell cell = null; if (cellValue != null) { string cellValueAsString = cellValue.ToString(); if (!string.IsNullOrEmpty(cellValueAsString)) { cell = InsertCellInWorksheet(GetColumnName(columnIndex), rowIndex); if ((cellValue is bool || cellValue is bool?)) { cell.DataType = CellValues.Boolean; } else if (cellValue is DateTime || cellValue is DateTime?) { cell.DataType = CellValues.Date; } else if (cellValue is string && !string.IsNullOrEmpty((string)cellValue)) { cell.DataType = CellValues.SharedString; } else if (cellValue is byte || cellValue is byte? || cellValue is sbyte || cellValue is sbyte? || cellValue is short || cellValue is short? || cellValue is ushort || cellValue is ushort? || cellValue is int || cellValue is int? || cellValue is uint || cellValue is uint? || cellValue is long || cellValue is long? || cellValue is ulong || cellValue is ulong? || cellValue is float || cellValue is float? || cellValue is double || cellValue is double? || cellValue is decimal || cellValue is decimal? ) { cell.DataType = CellValues.Number; } if (cell.CellValue == null) { cell.Append(new CellValue { Text = cell.DataType != CellValues.SharedString ? cellValueAsString : InsertSharedStringItem(cellValueAsString) }); } else { cell.CellValue.Text = cellValueAsString; } } } return cell; } protected string InsertSharedStringItem(string text) { // If the part does not contain a SharedStringTable, create one. if (SharedStringTablePart.SharedStringTable == null) { SharedStringTablePart.SharedStringTable = new SharedStringTable(); } int i = 0; // Iterate through all the items in the SharedStringTable. If the text already exists, return its index. foreach (SharedStringItem item in SharedStringTablePart.SharedStringTable.Elements<SharedStringItem>()) { if (item.InnerText == text) { return i.ToString(); } i++; } // The text does not exist in the part. Create the SharedStringItem and return its index. SharedStringTablePart.SharedStringTable.AppendChild(new SharedStringItem(new Text(text))); //SharedStringTablePart.SharedStringTable.Save(); return i.ToString(); } } Creare il SharedStringItem e restituire il suo indice. public class ExcelProcessor2010 { protected Cell AddCell(uint rowIndex, int columnIndex, object cellValue, int styleIndex) { //Removing the values for the Greyed out cell and Empty cell if (string.IsNullOrEmpty(Convert.ToString(cellValue)) || styleIndex == 33) { cellValue = " "; } Cell cell = AddCell(rowIndex, columnIndex, cellValue); cell.StyleIndex = (uint)styleIndex; return cell; } protected Cell AddCell(uint rowIndex, int columnIndex, object cellValue) { Cell cell = null; if (cellValue != null) { string cellValueAsString = cellValue.ToString(); if (!string.IsNullOrEmpty(cellValueAsString)) { cell = InsertCellInWorksheet(GetColumnName(columnIndex), rowIndex); if ((cellValue is bool || cellValue is bool?)) { cell.DataType = CellValues.Boolean; } else if (cellValue is DateTime || cellValue is DateTime?) { cell.DataType = CellValues.Date; } else if (cellValue is string && !string.IsNullOrEmpty((string)cellValue)) { cell.DataType = CellValues.SharedString; } else if (cellValue is byte || cellValue is byte? || cellValue is sbyte || cellValue is sbyte? || cellValue is short || cellValue is short? || cellValue is ushort || cellValue is ushort? || cellValue is int || cellValue is int? || cellValue is uint || cellValue is uint? || cellValue is long || cellValue is long? || cellValue is ulong || cellValue is ulong? || cellValue is float || cellValue is float? || cellValue is double || cellValue is double? || cellValue is decimal || cellValue is decimal? ) { cell.DataType = CellValues.Number; } if (cell.CellValue == null) { cell.Append(new CellValue { Text = cell.DataType != CellValues.SharedString ? cellValueAsString : InsertSharedStringItem(cellValueAsString) }); } else { cell.CellValue.Text = cellValueAsString; } } } return cell; } protected string InsertSharedStringItem(string text) { // If the part does not contain a SharedStringTable, create one. if (SharedStringTablePart.SharedStringTable == null) { SharedStringTablePart.SharedStringTable = new SharedStringTable(); } int i = 0; // Iterate through all the items in the SharedStringTable. If the text already exists, return its index. foreach (SharedStringItem item in SharedStringTablePart.SharedStringTable.Elements<SharedStringItem>()) { if (item.InnerText == text) { return i.ToString(); } i++; } // The text does not exist in the part. Create the SharedStringItem and return its index. SharedStringTablePart.SharedStringTable.AppendChild(new SharedStringItem(new Text(text))); //SharedStringTablePart.SharedStringTable.Save(); return i.ToString(); } } 

Sto generando file Excel utilizzando OpenXML. Sto provando a creare un tavolo in Excel come mostrato nell'image:

immettere qui la descrizione dell'immagine

Ma le sue intestazioni di colonne da Public / NonPublic a Public1, NonPublic2, Public3, NonPublic4 ecc … Dopo che alcune ricerche hanno capito che Excel prevede delle intestazioni di colonna uniche. Ma accade solo quando si crea Excel utilizzando OpenXML. Se si crea manualmente Excel e imposta le intestazioni come queste, allora funziona bene.

Qualcuno può aiutarmi a questo?