Spire.XLS is a professional Excel API that enables developers to create, manage, manipulate, convert and print Excel worksheets. Get free and professional technical support for Spire.XLS for .NET, Java, Android, C++, Python.
Thu Mar 07, 2019 7:57 pm
Hi,
We have an application where users can upload various types of Excel files through a web application. We are needing to convert these files to CSV. We implemented this code last year and verified that it was working correctly with xlsb files. Recently however it has come to our attention that this functionality is no longer working and we get a "File format is not be supported" error message.
We have a Spire.XLS Pro Edition 7.12 license. We have tested with that version of the dll as well as the latest 9.2.11.6046 version of the Spire.XLS.dll.
The code is as follows:
public ActionResult UserFiles_Upload(IEnumerable<HttpPostedFileBase> files, int dataloadID)
{
Workbook workbook = new Workbook();
workbook.LoadFromStream(file.InputStream); <-- Error here
Can you please help?
-
johansec
-
- Posts: 7
- Joined: Wed May 02, 2018 12:04 pm
Fri Mar 08, 2019 3:34 am
Hello,
Thank you for contacting.
Please specify the Excel version like the following code snippet when loading a .xlsb file stream to get rid of this exception. If there is any other questions, welcome to write back.
- Code: Select all
.....
workbook.LoadFromStream(file.InputStream, ExcelVersion.Xlsb2010);
.....
Sincerely,
Lisa
E-iceblue support team
-
Lisa.Li
-
- Posts: 1261
- Joined: Wed Apr 25, 2018 3:20 am
Fri Mar 08, 2019 1:07 pm
Thank you. That resolved the problem.
-
johansec
-
- Posts: 7
- Joined: Wed May 02, 2018 12:04 pm
Mon Mar 11, 2019 1:30 am
Hello,
Glad to hear that! If you need other helps, please do not hesitate to contact us.
Wish you all the best!
Sincerely,
Lisa
E-iceblue support team
-
Lisa.Li
-
- Posts: 1261
- Joined: Wed Apr 25, 2018 3:20 am