/* xls2xml: Converts from Microsoft Excel files to XML. Copyright 1999 Roberto Arturo Tena Sanchez This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* Roberto Arturo Tena Sanchez */ --- M$ have errors on documentation, biff records numbers not ever is ok. fixed here. --- Record "FONT: Font Description (231h)", wich is not 231 but 31, M$ forget to tell in BIFF8 this structure changes: + must be 4 font structures min, not 5 (which ones?) + bytes from byte 17 (previously reserved) changes, now instead: c8 00 00 00 ff 7f 90 01 00 00 00 00 00 00 05 41 ...............A 72 69 61 6c rial we have: c8 00 00 00 ff 7f 90 01 00 00 00 00 00 00 05 01 ................ 41 00 72 00 69 00 61 00 6c 00 A.r.i.a.l. byte 19 = 01 seems to be const byte 17 is unknown byte 18 seems to be characters in string note: it's NOT a strict unicode string... =( guess: byte 19 is option flags's unicode string that means: byte 17+18 are count of chars? impossible: 00 05 is 0x0500=1280decimal sol: when calling write_unicode_xml_child, overwrite bytes 17+18 with the value: valueofbyte18 | 00 byte 17 18 in the example above: 05 00 --- I have found that, if you use Excel 97 to save a Workbook that contains a cell with a very large string, and save it as Excel 5/95, it truncates the string. It's not Excel 97 bug: it's a Excel 95 binary file format design bug. ---