Build 4.9.0.32 of xlsgen adds an XLS conversion pack. It is made of the following :
- XLSX to XLS file conversion (also XLSM to XLS)
- XLSB to XLS file conversion
- XLSX to XLSB : VBA macros preserving
- XLSB to XLSX : VBA macros preserving
The conversion from XLSX or XLSB files back to XLS files is the bigger piece of the pie. In 2022, it sounds a little odd to hear that we are still providing tools to leverage XLS files, but for legacy systems out there, it may be the only option available. So there it is. Of course, converting to a XLS file comes with a baggage : the sheet rows and columns are much smaller (64K rows per sheet instead of one million, ...), a number of objects are not supported at all (such as the data model), and a number of objects are partially supported (such as conditional formattings where databars simply do not exist). Those wanting to leverage XLS files when it's known to be such a subset of XLSX/XLSB better know what they are doing.
Here is how XLSX ==> XLS conversion works :
workbook = engine.Open("inputfile.xlsx", "outputfile.xls");
workbook.Close();
Open() in-memory variants also work (OpenInMemory, OpenFromMemory).