I am building an Excel report in Visual Studio 2017 with EPPLus and one of my requirements is to attach all numbers linked with a certain ID to a single field, but when I try I get the following error:
"Excel found unreadable content in '[filenameHere.xlsx]'. Do you want to recover the contents of this workbook? If you trust the source of this workbook, click Yes"
When I do so, it returns another info box that states:
"Excel was able to open the file by repairing or removing the unreadable content. Repaired Records: String properties from /xl/sharedString.xml part (Strings)" and it offers a link to log files which reads:
"
error178480_01.xmlErrors were detected in file 'C:[filenamehere].xlsx'Repaired Records: String properties from /xl/sharedStrings.xml part (Strings) " I am pulling about 3,000 records into the field but only about 1800 show up when I run the code and the information is truncated. Here is an example:
StringBuilder groupString = new StringBuilder();
for (int i = 0; i <= 3000;i++)
{
groupString.Append("sampleNumber "+i.ToString()+",");
}
ExcelPackage exclPck = new ExcelPackage();
ExcelWorksheet exclWs = exclPck.Workbook.Worksheets.Add("example");
exclWs.Cells["A2"].Value= groupString.ToString();
exclPck.SaveAs(new System.IO.FileInfo("C:\\filenamehere.xlsx"));