Hi, we got This error when we use SaveAs method..(if we use
ExcelParseOptions.ParseWorksheetsOnDemand while opening the file)
workbook.SaveAs(outputStream);
at Syncfusion.XlsIO.Implementation.WorksheetImpl.Serialize(OffsetArrayList records, Boolean bClipboard, IRange range)
at Syncfusion.XlsIO.Implementation.WorksheetImpl.Serialize(OffsetArrayList records)
at Syncfusion.XlsIO.Implementation.WorkbookImpl.WorkbookExcel97Serializator.Serialize(OffsetArrayList records, ExcelSaveType saveType, IEncryptor encryptor, WorkbookImpl book, WorksheetImpl sheet, Boolean forClipboard, IRange range)
at Syncfusion.XlsIO.Implementation.WorkbookImpl.WorkbookExcel97Serializator.Serialize(Stream stream, WorkbookImpl book, ExcelSaveType saveType)
at Syncfusion.XlsIO.Implementation.WorkbookImpl.SaveAsInternal(Stream stream, ExcelSaveType saveType)
at Syncfusion.XlsIO.Implementation.WorkbookImpl.SaveAs(Stream stream, ExcelSaveType saveType)
Btw, when we dont use " ParseWorksheetsOnDemand" , and if Excel file drawing.xml has rot=0 in tag, and if we try to reach any cell , application freezes, doesnt respond and start to use high cpu. if we are debugging it , and bring mouse over ".WorkBook" then run, it works...
var a = workbook.ActiveSheet.Range["A1"].Value;
or we have to remove rot=0 from excel manually...thats why we started to use " ParseWorksheetsOnDemand".
it is very big problem for us.
using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
IWorkbook workbook = application.Workbooks.Open("../../Data/CustomerFile.xls");
var value = workbook.Worksheets[0].Range["E1"].Value;
workbook.SaveAs("Output.xls", ExcelSaveType.SaveAsXLS);
} |
First of all thank you for your fast reply.. I created new simple test project....when it runs, it doesnt give any error but it doesnt continue to next line..stuck in the line :
IWorkbook workbook = application.Workbooks.Open(directory + "\\Data\\CustomerFile.xlsx");
if I used ParseWorkseetOnDemand, the line above works but next line stuck
var value = workbook.Worksheets[0].Range["E1"].Value;
Can u test it..
i noticed, if i set WorkbookVersion to 2013 it works,
workbook.Version = ExcelVersion.Excel2013;
but i need original file to be saved.so now i can solve like that : maybe it can help you to find problem..
if(workbook.Version == ExcelVersion.Excel97to2003 )
{
workbook.Version = ExcelVersion.Excel2013;
workbook.SaveAs(outputStream);
workbook.Version = ExcelVersion.Excel97to2003;
workbook.SaveAs(outputStream);
}
else
{
workbook.SaveAs(outputStream);
}
Hi,
First of all thank you.
I can't download the patch.
When i try to reach file ,the page is asking for login information, when i enter it says
"
Hi, we downloaded the patch. Thank you.
But when i add it to project , there is and error about conflict
There was a conflict between "Syncfusion.Compression.Base, Version=19.1460.0.59, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89" and "Syncfusion.Compression.Base, Version=19.3500.0.43, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89".
do we need Syncfusion.Compression.Base dll as well?