ExcelRangeBase.LoadFromDataTable
Ampersands "&" in data are changed to "& ;" (without space) when loading cells from a GridView's DataTable.
DataTable gridViewTable = GetDataTable(aGridView);
ExcelWorksheet ws = pck.Workbook.Worksheets.Add("Sheet1");
ws.Cells["A1"].LoadFromDataTable(gridViewTable, true, OfficeOpenXml.Table.TableStyles.Medium1);
The following does __not__ demonstrate the problem:
ws.Cells["A1"].Value = "This & That";
Ampersands "&" in data are changed to "& ;" (without space) when loading cells from a GridView's DataTable.
DataTable gridViewTable = GetDataTable(aGridView);
ExcelWorksheet ws = pck.Workbook.Worksheets.Add("Sheet1");
ws.Cells["A1"].LoadFromDataTable(gridViewTable, true, OfficeOpenXml.Table.TableStyles.Medium1);
The following does __not__ demonstrate the problem:
ws.Cells["A1"].Value = "This & That";