4 ms·
Are they really "so complicated", or is it just a large amount of options, many of which might actually be ignorable for the task you're doing, that contribute
by userbinator 10y ago
Are they really "so complicated", or is it just a large amount of options, many of which might actually be ignorable for the task you're doing, that contribute to such an impression of complexity?
They were designed to be fast on very old computers. For the early versions of Excel for Windows, 1 MB of RAM was a reasonable amount of memory, and an 80386 at 20 MHz had to be able to run Excel comfortably.
To me, this suggests the opposite --- a complicated format would be difficult to parse efficiently. I found this document:
https://www.openoffice.org/sc/excelfileformat.pdf https://www.openoffice.org/sc/excelfileformat.pdf
...which shows that it's basically TLV, so for simple data extraction it doesn't seem so difficult after all. For example, if you're just after cell values, you don't have to care about fonts, printing, and other formatting info.
- TACIXAT 10y agoThe XML for Word files is a pretty big mess and it doesn't follow the spec in places. Headers for example, there are three section headers that can be specified, default, odd, and first. If odd and first are not included, it should go to default (according to the spec [1]), but it doesn't. The old format had some shortened names which made stuff really hard to follow to the uninitiated. [2] 1. http://www.ecma-international.org/publications/standards/Ecma-376.htm http://www.ecma-international.org/publications/standards/Ecm... (1st edition, part 4 for section headers.) 2. https://msdn.microsoft.com/en-us/library/office/dd921346(v=office.14).aspx https://msdn.microsoft.com/en-us/library/office/dd921346(v=o...
- IANAD 10y ago> Are they really "so complicated", or is it just a large amount of options, many of which might actually be ignorable for the task you're doing, that contribute to such an impression of complexity? Apache's library called it HSSF, Horrible Spreadsheet Format. You make the call. :)
- brianwawok 10y agoI have literally used it for YEARS and never knew what HSSF meant. https://en.wikipedia.org/wiki/Apache_POI https://en.wikipedia.org/wiki/Apache_POI was a fun read HPSF (Horrible Property Set Format) HSMF (Horrible Stupid Mail Format) DDF (Dreadful Drawing Format)
- userbinator 10y agoAmusing, but I also have the feeling that it's difficult for Java developers to appreciate the benefits of a binary format because the language doesn't make it easy to work with them. XML, on the other hand...
- vram22 10y agoPart of Apache POI, IIRC. It stood for: "Poor Obfuscation Implementation".
- jahewson 10y agoYes, they are really that complex. The Office file formats are incredibly complex. Lots of moving parts, many different ways to express the same thing, lots of legacy stuff, endless obscure low-level bit shuffling. The OLE container is a small filesystem. The Word format includes its own heap. What makes them fast is that they were designed to not require parsing at all. They are essentially a memory dump and can be loaded with a simple mmap. But if you want to "understand" what that data means, then you have a long and complex road ahead of you.