We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

XlsIo error when open file on Ubuntu

I used XlsIo with ASP .NET Core to open excel file add some data and save modified file to user.
All work well on windows but when host web on Ubuntu it gave error when open file

This is my code

FileStream inputStream = new FileStream(inputFileName, FileMode.Open);
IWorkbook workbook = excelEngine.Excel.Workbooks.Open(inputStream);
logger.LogInformation("Put data to excel file");

This is error when called.

ArgumentOutOfRangeException: Number was less than the array's lower bound in the first dimension. Parameter name: sourceIndex

This is stack trace

  • System.Array.Copy(Array sourceArray, int sourceIndex, Array destinationArray, int destinationIndex, int length, bool reliable)

  • Syncfusion.XlsIO.Implementation.TypedSortedListEx<TKey, TValue>.Insert(int index, TKey key, TValue value)

  • Syncfusion.XlsIO.Implementation.FormulaUtil.FillDefaultOperations()

  • Syncfusion.XlsIO.Implementation.FormulaUtil..ctor(IApplication application, object parent, NumberFormatInfo numberFormat, char chArgumentsSeparator, char chRowSeparator)

  • Syncfusion.XlsIO.Implementation.XmlReaders.Excel2007Parser..ctor(WorkbookImpl book)

  • Syncfusion.XlsIO.Implementation.XmlSerialization.FileDataHolder.ParseContentType()

  • Syncfusion.XlsIO.Implementation.XmlSerialization.FileDataHolder.ParseDocument(ref List<Color> themeColors, bool parseOnDemand)

  • Syncfusion.XlsIO.Implementation.WorkbookImpl.ParseStream(Stream stream, string password, ExcelVersion version, ExcelParseOptions options)

  • Syncfusion.XlsIO.Implementation.ApplicationImpl.CreateWorkbook(object parent, Stream stream, ExcelVersion version, ExcelParseOptions options)

  • Syncfusion.XlsIO.Implementation.Collections.WorkbooksCollection.Open(Stream stream, ExcelVersion version, ExcelParseOptions options)

  • VINPSP.Controllers.ReportController.GetExcelWorkBook(string id) in E:\Work\Office\Project\VINPSP\VINPSP\Controllers\ReportController.cs


I attached template file which the code open



Attachment: Template_622e9075.zip

4 Replies

KK Konduru Keerthi Konduru Ravichandra Raju Syncfusion Team December 17, 2019 12:22 PM UTC

Hi Sutthipong, 

Greetings from Syncfusion. 

We are working to reproduce the issue in mentioned configuration. We will update further details on 19th December 2019. 

Regards, 
Keerthi.


KK Konduru Keerthi Konduru Ravichandra Raju Syncfusion Team December 19, 2019 12:13 PM UTC

Hi Sutthipong, 

Thanks for your patience. 

We are unable to reproduce the reported exception while opening the shared Excel document in Ubuntu. We have checked the issue in Ubuntu version 16.4

We request you to share the Ubuntu Version and Syncfusion XlsIO version you are using at your end, which will be helpful for us to investigate further and provide prompt solution at the earliest. 

Regards, 
Keerthi. 



SU Sutthipong December 23, 2019 04:00 AM UTC

Mine using Syncfusion XlsIo.Net.Core 17.1.0.38
Server is Ubuntu 18.04




AV Abirami Varadharajan Syncfusion Team December 23, 2019 12:52 PM UTC

Hi Sutthipong, 

Thank you for updating us. 

We are unable to reproduce the reported issue. However, we have fixed the issue based on the shared stack trace. The patch to resolve issue can be downloaded from the following link. 

Recommended approach - exe will perform automatic configuration         
     
Please find the patch setup from below location:         
         
Advanced approach – use only if you have specific needs and can directly replace existing assemblies for your build environment         
     
Please find the patch assemblies alone from below location:         
         
Assembly Version: 17.1.0.38         
  
Installation Directions :          
This patch should replace the files “Syncfusion.XlsIO.Portable.dll” under the following folder.         
$system drive:\ Files\Syncfusion\Essential Studio\$Version # \precompiledassemblies\$Version#\4.6         
Eg : $system drive:\Program Files\Syncfusion\Essential Studio\ 17.1.0.38\precompiledassemblies\ 17.1.0.38\4.6      
         
To automatically run the Assembly Manager, please check the Run assembly manager checkbox option while installing the patch. If this option is unchecked, the patch will replace the assemblies in precompiled assemblies’ folder only. Then, you will have to manually copy and paste them to the preferred location or you will have to run the Syncfusion Assembly Manager application (available from the Syncfusion Dashboard, installed as a shortcut in the Application menu) to re-install assemblies.         
         
Note :          
You can change how you receive bug fixes by navigating to the following link and updating your preferences.          
      
Disclaimer :          
If you have received other patches for the same version for other products, please apply all patches in the order received.         
        
This fix will be included in our release version 17.4-SP1 which will be rolled out by end of January 2020.      

Kindly try and let us know if the issue is resolved at your end. 
   
Regards,   
Abirami.  


Loader.
Up arrow icon