GNOME Bugzilla – Bug 647492
works spreadsheet support
Last modified: 2011-05-04 19:28:46 UTC
Created attachment 185751 [details] [review] udiff patch for lotus importer to support ms works 2,3,4 spreadsheets. only basic formatting, formulas and nuber formats work now.
The attached file is a binary file I would have expected a patch (ie. a text file).
Created attachment 185752 [details] [review] udiff
Do you have some testfiles? And erhaps a link to the documentation for the mw works file format?
I guess this is related to bug #645940?!
Created attachment 187055 [details] [review] Updated patch This fixes a number of problem with the first patch: 1. Calls the right destructor for fonts. 2. Frees the style pool. 3. Hopefully works on machines that are not little-endian. [Needs tests] 4. Avoid compiler warnings. 5. Makes cell_set_fmt static. With a name like that it must be.
Patch from comment 5 left out works.h -- here it is #ifndef GNUMERIC_PLUGIN_LOTUS_123_WORKS_H #define GNUMERIC_PLUGIN_LOTUS_123_WORKS_H #define WORKS_VERSION_3 0x0404 #define WORKS_BOF 0xff #define WORKS_FONT 0x5456 #define WORKS_STYLE 0x545a #define WORKS_SMALL_FLOAT 0x545b #endif
This is also related to bug #35239 (yes, 5 digits)
Note that we also have a MS Works file attached to bug #557911 (a duplicate of bug #35239).
I'd say we have test files now. But getting documentation would be very, very nice. Urmas?
With the test file from bug 557911, these records aren't being handled by lotus_read_works. We have no idea what 0x54?? is. The rest might be the same as for the other formats. Unknown record 0x1a of length 8. Unknown record 0x24 of length 1. Unknown record 0x25 of length 242. Unknown record 0x26 of length 242. Unknown record 0x2 of length 1. Unknown record 0x31 of length 1. Unknown record 0x3 of length 1. Unknown record 0x4 of length 1. Unknown record 0x5401 of length 12. Unknown record 0x5405 of length 2. Unknown record 0x5423 of length 28. Unknown record 0x5426 of length 2. Unknown record 0x5450 of length 18. Unknown record 0x545a of length 10. Unknown record 0x545c of length 2. Unknown record 0x545d of length 4. Unknown record 0x545e of length 4. Unknown record 0x5462 of length 22. Unknown record 0x5465 of length 4. Unknown record 0x5466 of length 2. Unknown record 0x5467 of length 374. Unknown record 0x546b of length 4. Unknown record 0x546f of length 1. Unknown record 0x5 of length 1. Unknown record 0x6 of length 8. Unknown record 0x7 of length 31. Unknown record 0x8 of length 3. Unknown record 0xb of length 24.
There's no documentation released, it's entirely a guesswork. Examples: #define WORKS_COL_FORMAT 0x545d #define WORKS_ROW_FORMAT 0x545e #define WORKS_PAGE_SETUP 0x5423 #define WORKS_ROW_HEIGHT 0x5465 Still, the current implementation is on par with Lotus importer feature-wise.
*** Bug 35239 has been marked as a duplicate of this bug. ***
If I use this patch on the file from bug #645940, then B1 contains ├ݯý¹ ß¹Ù¹§ ÔÕýÕÝ I suspect that this should be Гномы былых времен or something like that.
*** Bug 645940 has been marked as a duplicate of this bug. ***
@Urmas, when we get to the stage of adding your patch it would be good to have your name to add appropriate credit.
This problem has been fixed in our software repository. The fix will go into the next software release. Thank you for your bug report.