XLS file saved with htm extension

Hello Aspose Team,

I have few ".xls" files with a saved types ."html/.htm" & when I try to open these work book get an error "It is not a valid excel file". Is there way to handle these files? or any workaround to save resave these file as xls & then process. Please adivce.

Thanks,

Rohit

Hi,

For Aspose.Cells for .Net, we don't support to read/write html files, we only support to read / write native excel files (.xls,xlsx, csv, txt, tab delimited, SpreadsheetML .xml etc.). We will support html file format soon.

For java version, you may try to use FileFormatType.HTML option.

Thank you.

Thanks for replying,

I am using java version of Aspose cell. I tried our adive..but give me the same error still. I have attached the sample file & also find below the sample code

Workbook workbook = new Workbook();

workbook.open("c:\\temp\\Book1.xls",FileFormatType.HTML);

Please let me know

Hi,

Well, your template file is neither a standard .html file nor a native excel file, so it won't be read by Aspose.Cells component. For confirmation you may open "Book1.xls" file into your notepad and check.

Thank you.

Well that’s excatly my problem.Can this be handled?

>>We will support html file format soon. (Aspose.Cells for .Net, support to write html files)

Any timeframe estimation? Days? Weeks? Months?

Aspose.Cells for Java supports to export a file in html format however it doesn't support to import an html file. Aspose.Cells for .Net doesn't support to import/export html files. We will support to export html files in .Net version within 1-2 months.

For import html files, it's much more complex. We will make it but don't have a specific time frame yet.

Thxs Lauren for considering this option. It would be nice feature to add. Please keep posted. On second note, it would be also great to support import of PDF files, if not yet supported.

For importing pdf files, I think you can try our other products: Aspose.Pdf or Aspose.Pdf.kit