Saving a file to output stream with extension xlw and xlt

Hi,

While saving a file I am using workbook.save(output stream, Save Format) method.

Now we need to cover all the excel extensions in our functionality. Using the above mentioned method I am not able to save files with extension xlw and xlt as corresponding Save Format doesnot exist in com.aspose.cell.SaveFormat class. Can you please guide me through this.

Thanks in advance

Tarun

Hi,

Thanks for your posting and using Aspose.Cells.


Well, Microsoft Office Excel Template (.xlt) is same as XLS (Excel 97-2003) file. Aspose.Cells does support to read XLT file format, also, you may save it to XLT file format. See the following sample code:

Sample code:

//Open XLT file

Workbook wb = new Workbook(“e:\test2\myfile.xlt”);



workbook.save(“e:\test2\out.xlt”, SaveFormat.Excel97To2003);

Thanks for your quick response.

Does SaveFormat.Excel97To2003 hold good for xlw files as well..

Thanks once again

Tarun

Hi,

Thanks for your posting and using Aspose.Cells for Java.

It should work fine with the xlw file. If you encounter any issue, please provide us your xlw file. We will look into your issue and update you asap.