Here is a proposed patch to dif.c to fix the issues addressed above.
Recent Excel versions no longer output the extraneous BOT prior the
the EOD. I suggest that this non-conforming record be dropped for
compatibility with the original VisiCalc and DIF Clearinghouse
standard. However, Excel does still swap the VECTORS and TUPLES
header records, but is agnostic when importing, looking at the actual
data representation. Openoffice outputs standard conforming DIF
files, I have not see any bug reports about incompatibility with the
MS mangled DIF coming from their camp.
Thanks,
Stanley Pinchak
--- /tmp/dif.c 2011-03-02 17:08:56.000000000 -0500
+++ /tmp/dif.c.new 2011-03-02 17:14:54.000000000 -0500
@@ -319,8 +319,8 @@
/* Write out the standard headers */
gsf_output_puts (out, "TABLE\n" "0,1\n" "\"GNUMERIC\"\n");
- gsf_output_printf (out, "VECTORS\n" "0,%d\n" "\"\"\n", r.end.row+1);
- gsf_output_printf (out, "TUPLES\n" "0,%d\n" "\"\"\n", r.end.col+1);
+ gsf_output_printf (out, "VECTORS\n" "0,%d\n" "\"\"\n", r.end.col+1);
+ gsf_output_printf (out, "TUPLES\n" "0,%d\n" "\"\"\n", r.end.row+1);
gsf_output_puts (out, "DATA\n" "0,0\n" "\"\"\n");
locale = gnm_push_C_locale ();
@@ -355,9 +355,6 @@
}
}
- /* This BOT is not required as far as I can tel, but MS seems to puts
- * one here, and it may be useful to be compatible */
- gsf_output_puts (out, "-1,0\n" "BOT\n");
gsf_output_puts (out, "-1,0\n" "EOD\n");
gnm_pop_C_locale (locale);
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]