HTML saved as xls

Hi,

My customers send xls files to us and we process them to pdf. Some customers send html format files and saved them as xls and sends us. They open file in microsoft excel but we couldn't convert them to pdf. Is there any way to convert them to pdf?

Please see attached xls file.

Thanks,

SubbaM

Hi,

I am afraid, your attached file is HTML/Web page and Aspose.Cells does not support to open/load or convert HTML files. Anyways, I have logged a ticket for your feature request with an id: CELLSNET-28600. It might not be supported soon. If we have any update, we will let you know here.

Thank you.

Hi,

Please also note, you can detect your file format without processing it beforehand. For example, the following code detects your .xls file as Unknown format. If it was a real xls file, it would detect it as Default.

C#


var fileFormat = CellsHelper.DetectFileFormat(@“F:\Shak-Data-RW\Downloads\ABC+RentRoll03.11.xls”);

This gives UnKnown for the file I submitted. FileFormat isn't detecting HTML format of excel. The attached xls is of type HTML.

Hi,

Once it gives you Unknown, then it means it is not xls/xlsx file and you don’t need to do any further processing. And if you want to check it further, then you load the file as string and find “<html” substring inside it. If you find it then it means it is an html file otherwise it is some other file.

You can also try to find or [ending] tags etc.

The attached xls(ABC RentRoll03.11.xls) is an html file. They save html file with extension .xls and it opens in excel. There are many formats that excel supports.

http://office.microsoft.com/en-us/excel-help/file-formats-that-are-supported-in-excel-HP010014103.aspx

Hi,


Thank you for further information. We have attached your comments to the Ticket associated with this thread.
Soon we will get back to you on this.