We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Aspose.Cells Save method for XLSB

What am I missing, I'm modifying my code to export an XLSB from my web site. The template spreadsheet is XLSB and the file save string is explicit to save as XLSB. I changed the save option to XLSBSaveOption. Yet, I'm prompted that the output is Excel 2003 format and extension. My code is below, what am I missing?

Dim PriceCreditFile As String = path + "\price_credit\pc_challenge.xlsb"

Dim excel As Workbook = New Workbook(PriceCreditFile)

Dim sheet As Worksheet = excel.Worksheets("Raw_Data")

excel.FileFormat = FileFormatType.Xlsb

sheet.Cells.ImportDataTable(ExportDataSet.Tables(0), False, "A2")

excel.Save(Me.Response, strSaveAsFile, ContentDisposition.Inline, New XlsbSaveOptions(SaveFormat.Xlsb))


Thanks for your posting and using Aspose.Cells for .NET.

Please download and try the latest version: Aspose.Cells
for .NET v7.3.5.1
and let us know if it makes any difference.

Please modify your existing code into this one. I have now used OoxmlSaveOptions and ContentDisposition.Attachment instead,


excel.Save(Me.Response, strSaveAsFile, ContentDisposition.Attachment, New OoxmlSaveOptions(SaveFormat.Xlsb))


If your issue is still present, then please provide us your sample runnable project and the source files. We will look into your issue at our end and log it if we found any bug.

Thanks, the code change took care of it, though I was using V7.3.5.0, I did install the update ( you provided.


Good to know that your issue is resolved following the suggestion (code change) by my fellow colleague.

Feel free to contact us any time if you have further query or have any other issue. We will be happy to assist you here.

Thank you.