Я пытаюсь сохранить файл Excel 90000 строк x 2000 столбцов, используя EPPlus. Ошибка System.OverflowException: «Размеры массива превысили поддерживаемый диапазон». Из do c Excel поддерживает максимум столбцов 16,384
и строк 1,048,567
. Любая идея, пожалуйста
using (var excel = new ExcelPackage())
{
var ws = excel.Workbook.Worksheets.Add("test");
//ws.Cells["A1"].LoadFromText(new FileInfo(csvFilePath));
for(int r = 1; r < 90000; r++)
{
for (int c = 1; c < 2000; c++)
{
ws.Cells[r, c].Value = r*c;
}
}
excel.SaveAs(new FileInfo(excelFilePath));
}
Ошибки:
System.OverflowException: 'Array dimensions exceeded supported range.'
устранены путем добавления в app.conf
<runtime>
<gcAllowVeryLargeObjects enabled="true" />
</runtime>
и ошибки:
OfficeOpenXml.Packaging.Ionic.Zip.ZipException:
Compressed or Uncompressed size, or offset exceeds the maximum value.
Consider setting the UseZip64WhenSaving property on the ZipFile instance.
все еще открыт.