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?
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.
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”);
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.
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.