Error while SaveAs method

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)


Attachment: 132797037354957417__Copy_of_RFQ__ATLAS_SHIP_SUPPLY__PLA_PROV_2021_110__7556_15e8b106.zip

14 Replies

MU Murat October 28, 2021 12:49 PM UTC

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.


Attachment: ss1_98e42958.zip


KK Konduru Keerthi Konduru Ravichandra Raju Syncfusion Team October 29, 2021 09:20 AM UTC

Hi Murat, 

Greetings from Syncfusion. 

We are able to reproduce the reported exception while using ParseWorksheetsOnDemand and validating it currently. We will share the validation details in 2 business days, on November 2nd,2021. 

But did not face any issue while trying to access a cell value, without ParseWorksheetsOnDemand. Below is the code snippet we have used at our end. 

Code Snippet: 

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); 

Regards, 
Keerthi. 



MU Murat replied to Konduru Keerthi Konduru Ravichandra Raju October 29, 2021 10:46 AM UTC

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..


Attachment: TestSyncfusion_d44e3c82.zip


KK Konduru Keerthi Konduru Ravichandra Raju Syncfusion Team November 1, 2021 10:13 AM UTC

Hi Murat, 

Thanks for sharing the issue reproducing sample. 

We are now able to reproduce the reported issue and validating it currently. We will share the validation details on November 3rd, 2021. 

Regards, 
Keerthi. 



MU Murat November 1, 2021 10:34 AM UTC

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);

                    }



KK Konduru Keerthi Konduru Ravichandra Raju Syncfusion Team November 1, 2021 10:59 AM UTC

Hi Murat, 

Thanks for sharing this information. 

We will consider this in validation and share the details on November 3rd,2021 as promised. 

Regards, 
Keerthi. 



KK Konduru Keerthi Konduru Ravichandra Raju Syncfusion Team November 2, 2021 01:50 PM UTC

Hi Murat, 

We appreciate your patience. 

We have confirmed the issue as Exception is thrown while resaving XLS document opened with parse on demand option and logged a defect report. We will provide the patch for this issue on November 16th,2021

You can track the status of defect report through following feedback link. 

Regards, 
Keerthi. 



KK Konduru Keerthi Konduru Ravichandra Raju Syncfusion Team November 3, 2021 12:00 PM UTC

Hi Murat,  

We appreciate your patience.  

We have confirmed the issue as Application is hanging when picture has empty XML elements in Excel document and logged a defect report. You can track the status of defect report through following feedback link.  

We will provide patch for both Application is hanging when picture has empty XML elements in Excel document and Exception is thrown while resaving XLS document opened with parse on demand option on November 16th,2021

Regards,  
Keerthi. 



KK Konduru Keerthi Konduru Ravichandra Raju Syncfusion Team November 16, 2021 02:45 PM UTC

Hi Murat, 

We deeply regret for the inconvenience. 

We are facing complexity in resolving the issues and request you 3 more days timeline to provide the patch. We will provide the patch on November 19th,2021. 

We appreciate your patience. 

Regards, 
Keerthi. 



KK Konduru Keerthi Konduru Ravichandra Raju Syncfusion Team November 19, 2021 03:47 PM UTC

Hi Muart, 

We appreciate your patience. 

We have fixed the issues and generated custom assembly in the version 19.3.0.43. This custom assembly can be downloaded from below link. 

Kindly try this and let us know if the issue is resolved. 

Regards, 
Keerthi. 



MU Murat replied to Konduru Keerthi Konduru Ravichandra Raju November 20, 2021 05:56 PM UTC

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 

"

You don’t have permission to access this file. The reason may be:
  • The incident associated with this file is not tied to the account you used to log in. To Logout use this .
  • Your enterprise portal admin has not allowed you to access other portal users’ incidents. Ask admin to change the support visibility in their Syncfusion profile.
If you feel this information is wrong and you need to download this file, please contact us."
in my Dashboard , patchs page doesnt show anything.
Please hel



KK Konduru Keerthi Konduru Ravichandra Raju Syncfusion Team November 22, 2021 10:19 AM UTC

Hi Murat, 

We are able to download the patch assembly from provided link, properly. However, we have uploaded the patch into a new link for you. Please download from this new link and let us know if the issue is resolved. 


Regards, 
Keerthi. 



MU Murat replied to Konduru Keerthi Konduru Ravichandra Raju November 22, 2021 09:07 PM UTC

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?




KK Konduru Keerthi Konduru Ravichandra Raju Syncfusion Team November 23, 2021 11:47 AM UTC

Hi Murat, 

We have provided custom Assembly in the version 19.3.0.43. So Syncfusion.Compression.Base of version 19.3.0.43 alone satisfies the requirement. We suggest you to un-install Syncfusion.Compression.Base of version 19.1.0.59 to overcome the reported issue. 

Note: It is always recommended to have same version packages to avoid these type of errors. 

Regards, 
Keerthi.

Loader.
Up arrow icon