我得到系统内存不足异常。我的xls文件的大小是357 MB。我不确定必须配置什么才能打开繁重的文件。
我指的是这个网站qazxsw poi上提供的文档
堆栈跟踪如下:
Syncfusion.XlsIO.Parser.Biff_Records.BiffContinueRecordRaw.ExtractContinueRecords()在Syncfusion.XlsIO.Parser.Biff_Records.MSODrawingGroupRecord.ParseStructure()处于Syncfusion.XlsIO.Parser.Biff_Records.BiffRecordRawWithArray.ParseStructure(DataProvider提供程序,Int32 iOffset,Int32 iLength, ExcelVPersion版本)在Syncfusion.XlsIO.Parser.Biff_Records.BiffRecordRaw.FillRecord(BinaryReader reader,DataProvider provider,IDecryptor decryptor,Byte [] arrBuffer)
如果需要任何信息,请告诉我。
编辑2:代码
https://help.syncfusion.com/file-formats/xlsio/excel-to-pdf-conversion
发生异常的行标有星号
我们可以使用“ParseWorksheetsOnDemand”减少内存消耗的使用。请参考ExcelEngine excelEngine = new ExcelEngine();
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Excel2013;
**IWorkbook workbook = application.Workbooks.Open(src_file, ExcelOpenType.Automatic);**
ExcelToPdfConverter converter = new ExcelToPdfConverter(workbook);
了解更多详情,我们也在UG中讨论了类似的问题。
如需进一步验证,请通过Direct-Trac向我们提供您的输入文档,我们将进一步分析并提供更多详细信息。