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

Free Support Forum - aspose.com

Cells.java fails to auto-detect HTML spreadsheet

When running an HTML-formatted spreadsheet into Cells, I keep getting the following message:

java.io.IOException: It is not a valid excel file: This is not a structured storage file.

The code i’m using to open the spreadsheet is:

Workbook wb = new Workbook();
wb.open(System.in, 1);

Any ideas?
See, this auto-detect is a crucial feature for me.

Thank you

Hi Adi,

From your code:
Workbook wb = new Workbook();
wb.open(System.in, 1);

You have specified the file format as EXCEL97TO2003(Constant value is 1), so we do not detect the file format again. To use auto-detect, please remove the second parameter for file format:

Workbook wb = new Workbook();

For reading html files, we only support to manipulate those html files that have MS Excel structure or MS Excel oriented. And only when the content of the html file starts with "<html" or "<!DOCTYPE html" we take it as html file format automatically.