We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Save Excel file in 2007- 2010- 2013 in Java using Aspose 8.0.2

Hi team,

Could you please guide me on how to save the Excel file in 2007, 2010, 2013 Excel format using ASPOSE. And how to differentiate the File version once it get saved.

I am using Java with Aspose 8.0.2.

Early reposense highly appraisiable.

Thank you

Hi,


All three versions of MS Excel (2007, 2010, 2013) support similar file formats (e.g XLS, XLSX, XLSM, XLSB, CSV, Tab Delimited etc.). There is no differentiation regarding in which MS Excel the file was generated, all MS Excel versions (2007, 2010, 2013) do open the above mentioned file formats fine. Aspose.Cells support all the file formats that MS Excel (97-2010/2013) supports, see the following sample code for your reference:
e.g
Sample code:

//Create a new workbook
Workbook workbook = new Workbook();

//…
/…Your code goes here.
//…

workbook.save(“out1.xlsx”, SaveFormat.XLSX); //save the Excel file.

Thank you.

Hi Amjad,

Thank you for your quick reply.

But as per my understanding 2013 excel file is something diffrener=t than 2010 file. If we save file using 2013 then will get that format or it will appear as like 2007,2010 file only.

Thanks,

Hi,

Well, using any of the MS Excel versions (i.e., 2007, 2010 or 2013), you would use XLS, XLSX, XLSM, XLSB, CSV, Tab Delimited etc. file format to save the file. A file created in MS Excel 2013 would be equally opened fine into MS Excel 2007 or 2010. Moreover, there are some new features and other enhancements that you may use only in MS Excel 2013 regarding data analysis, charting, formulas etc. If you have used those new features in MS Excel 2013 file (e.g XLSX), now when you open the file into MS Excel 2007/2010, the relevant objects (for new features/enhancements) would be skipped but MS Excel 2007/2010 would display the file fine.

Hope, you understand now.

Thank you.

Thank you Amjad for your nice explaination.

Hi,


You are welcome. Feel free to contact us any time if you need further help or have some other issue or queries, we will be happy to assist you soon.

Thank you.

Hi Amjad,

Sorry for late reply…but thanks for your help.

If I save one file in excel 2013 format, now I am uploading that file via UI.

Is there any way to check file version (like 2007, 2010, 2013) as all version have same extension?

Plz help

Hi,


Well, I am afraid, there is no such API available to evaluate in which version of MS Excel (2007, 2010, 2013) a file is created. But, I think you can easily check this in “workbook.xml” file by yourself, if there is an element like following:
, you can get the file version by evaluating the number such as 4 or 5 or 6… etc. For example, 4 refers to Excel 2007, 5 refers to Excel 2010 and so on.

Hope, this helps a bit.

Thank you.

Thanks for you quick reply as usual…

But how can open xlsx file in xml format…
Does I need to convert it to XLSX to XML first?

Hi,


Well, XLSX is actually zipped format, so, I think you may extract the XLSX file via some zipped utility, then use your own JAVA code to open workbook.xml file.

Thank you.

How can I extract XLSX file using zipped utility??
Does I need any software for it.

Thanks

Thanks…

I got the solution

Hi Amjad,

I am using below code to save file in excel 2007, 2010, 2013

if(format.equals(“EXCEL-2007”) || format.equals(“EXCEL-2010”) || format.equals(“EXCEL-2013”))
wb.save(filePath, FileFormatType.XLSX);

My server don’t have excel installation. I am running application on client machine which have excel2013.

I ran one report on client by hitting server URL and select format as EXCEL-2013.

Downloaded same report on client and extract the XML file from that XLSX.

But I am getting excel version as EXCEL-2007

lastEdited=“4”

could you help me on this …to save file as EXCEL-2013??

Hi,


Do you mean to say that you have a template XLSX file that was created in Excel 2013 manually and you use Aspose.Cells to re-save it, it saves in Excel 2007 (with lastEdited=“4”) format, could you provide the template file here, we will check it soon.

By the way, if you are creating new file (from the scratch), Aspose.Cells would save it in Excel 2007 file format version by default and this is correct behavior.

Thank you.

Hi Amjad,

My server have one template .XLSX file. Java code use to copy that template and then save it as EXCEL-2007, 2010, 2013 format as per user requirement.
So my code is not creating any file from scratch, it just copying existing file and saving as expected format.

but if I want to save it in excel 2013 format, its saved in 2007 format. Plz help

Hi,


Could you share the template XLSX file here, we will check your issue soon.

Thank you.

Hi Amjad,

I have one template .xlsx file which have lastEditited=“4”(2007). I used to populate data ino this xlsx file and want to save into EXCEL-2007, 2013, 2013 format as per user requirement.

Is it possible in ASPOSE??

Early response is appreciated

Thanks

Hi,


Please see the reply in your other thread for your reference:
https://forum.aspose.com/t/71131

Thank you.

Hi Amjad,

lastEdited tag does not specify Excel App version but it specifies Excel version which is like saving multiple version of same document.

As per Microsoft AppVersion property determines whether it is Excel 2017, Excel 2010 or Excel 2013.

Could you please help to check AppVersion of excel file which was created by using ASPOSE?

Early response is highly appreciated.

Thanks

Hi,


Well, if a template XLSX file is created in MS Excel 2007, then when you re-save it it would also be in that format. And, if the template file is created in Excel 2013 and then you re-save it, it would be in Excel 2013 format.

PS. I am afraid, we do not provide any API to check or update App version.

Thank you.