469,268 Members | 942 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,268 developers. It's quick & easy.

Writing to xlsx files

10
Hi, I am trying to write to data to a .xlsx file(Excel 2007). I can currently write the data to a .xls file. I tried to change the extension of the xls file (to xlsx) but Excel gave the following error:Excel cannot open the file 'Filename.xlsx' because the file format or file extent ion is not valid. Verify that the file has not been corrupted and that the file extension matches the format of the file.
I know Excel(2007) can open the xls file but I would like to save the data directly to a xlsx file.
Is it possible?, if not is there a way to automatically convert the file from the xls format to the xlsx format?
Any advice would be greatly appreciated
Thanks in advance
Jan 7 '09 #1
3 12891
Dormilich
8,651 Expert Mod 8TB
XLS and XSLX are two different file formats. you have to convert xls to xlsx to open the latter correctly. you can use for that Microsoft's own converter or get the appropriate OpenXML Doc for spreadsheets and rewrite your xls converter.

regards
Jan 7 '09 #2
wolfjmt
10
OK I do it that way
Thank for the quick reply and help
Jan 7 '09 #3
XSLX is just a Zip archive, you can open it programmaticaly with any library available for you, inside of it you willfind your XML source with data. To understand this format in depth just rename .xlsx extension into .zip and extract content on disk and just go through files you will see there. This will help you a lot. This valid for all Microsoft Office 2007 file formats.
Jan 9 '09 #4

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

5 posts views Thread by SomeDude | last post: by
2 posts views Thread by George Marsaglia | last post: by
6 posts views Thread by guy | last post: by
24 posts views Thread by ypjofficial | last post: by
35 posts views Thread by rbt | last post: by
2 posts views Thread by ShihChun | last post: by
1 post views Thread by Michael Leithold, WWK | last post: by
1 post views Thread by Doogie | last post: by
5 posts views Thread by wolfjmt | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.