5 ms·
They're totally different formats. It'd have to be a separate implementation. xls is binary, xlsx is XML based.
by skeletonjelly 12y ago
They're totally different formats. It'd have to be a separate implementation. xls is binary, xlsx is XML based.
- troels 12y agoxls is not just one format. There are several formats which Excel will understand, that uses that extension. One of them is a real simple xml-based format (SpreadsheetML), that is way easier to generate than proper excel files and has most of the features you need (At least for data transport purpose). Highly recommend using it.
- Mikhail_Edoshin 12y agoI second SpreadsheetML; it's plain XML (not multi-part compressed .xslx) and it supports multiple sheets, formulas, formatting, and some other bits like named ranges, print settings, and such.
- justincormack 12y agoOk,so is there a simple implementation guide/library?
- Mikhail_Edoshin 12y agoYes, here it is: http://msdn.microsoft.com/en-us/library/aa140066%28office.10%29.aspx http://msdn.microsoft.com/en-us/library/aa140066%28office.10... It only describes the data part and doesn't document Excel options such as print settings and filters; if you need them, create a sample in Excel, save it as XML Spreadsheet 2003 and examine the result. (The 'big' Excel format that is a part of Office Open XML format is also called Spreadsheet ML, but they're different; from what I understand this one is a subset.)
- the_why_of_y 12y agoIt's a deprecated format that was essentially Microsoft's first experiment at an XML based format in the Office XP/Office 2003 days... whether it will continue to be supported in future versions is anybody's guess, given that the successor format OOXML is much more widely adopted.
- Mikhail_Edoshin 12y agoMy impression is that Microsoft is fairly reliable when it comes to supporting old formats and standards. E.g. I can still send Word and Excel DDE commands and this is a tech from 90s, Windows 3.1 and stuff. OOXML is certainly more powerful, but it's also more complex.
- troels 12y agoHere's a really basic implementation that I used in some code as a drop-in replacement for csv: https://gist.github.com/troelskn/cf9df474662c88ba7951 https://gist.github.com/troelskn/cf9df474662c88ba7951
- justincormack 12y agoI know that they are totally different, wondering if xlsx is simpler so that it would be easier code, or whether it is just as complex really, and not suer what real world compatibility is.