Free Support Forum - aspose.com

Aspose cell throwing error for XLSX files

Hi,

We are using Aspose cells 18.2.0.0 we are getting below exception while initialising aspose workbook
“this file’s format is not supported or you don’t specify a correct format”.

We are using this in SharePoint 2013 environment, code sample below:

//Fetch SharePoint Doc library
SPList doclist = docweb.GetList(“Path of SharePoint doc library”);
//Get item from SharePoint document library
SPListItem item = docweb.GetListItem(“path of document”);
SPFile objspFile = item.File;

byte[] byteArray = objspFile.OpenBinary();

excelDocument = new Aspose.Cells.Workbook(stream);

Getting exception in last line

We are getting exception for any XLSX file, for testing we also created a new xlsx file using office 16 excel, still the code is throwing same exception

–thanks,
Swapnil

@swapnilbh,

Thank you for your query.

Please send us one of the sample XLSX file which is created using Office 16 for our analysis. Also save the byteArray data (retrieved from SharePoint doc library) in a file and share that file with us for our testing.

Hi Ahsan Iqbal,

here is the file attached File Name: SampleTest.xlsx

SampleTest_xlsx_file.zip (5.8 KB)


Thanks
Swapnil

Please try to reproduce the issue with sample file attached

@swapnilbh,

We have tried to load this file into Workbook object, but no issue is observed. This file is loaded fine without any issue using Apose.Cells for .NET 18.6. You may try this issue with the latest version and if issue is not resolved, please share the complete sample code which can be used to re-produce the issue. I tried following sample code to test the attached file:

Workbook wb = new Workbook(@"SampleTest.xlsx");

Hi Team,

Can you please try to reproduce using these files ? And let us know if you find anything or the same.
File Name:

  • COUNTRY_LIST+(15Aug2017)_.xlsx
  • WRC_Prod_AV_Testing_19Jan2017+.xlsx
    NewFiles.zip (334.3 KB)


Thanks,
Swapnil

@swapnilbh,

We have tried both the files but could not find any issue as these are loaded fine into Workbook object without any exception. Please provide us detailed steps to re-produce issue using these two files with the latest library Aspose.Cells for .NET 18.6.

Hi team,

We will try using the latest version of Aspose 18.6 used by you as currently we are using 18.2
will get back to you with detailed steps after that .

Thanks
Swapnil

@swapnilbh,

Thank you for the feedback.