Difference between revisions of "Talk:Ods2wiki.pl"

From Organic Design
Jump to: navigation, search
(it worked well with no errors processing about 1000 rows per second)
(Change source-code blocks to standard format)
 
Line 1: Line 1:
 
== Repeated columns ==
 
== Repeated columns ==
 
A bug was found in the Open Office spreadsheet parser where some rows would have the wrong column count, this was finally isolated to a new attribute called ''table:number-columns-repeated'' which allows identical columns to be defined just once as shown in the snippet below. The first table row has a missing column, but is using the new attribute to duplicate it.
 
A bug was found in the Open Office spreadsheet parser where some rows would have the wrong column count, this was finally isolated to a new attribute called ''table:number-columns-repeated'' which allows identical columns to be defined just once as shown in the snippet below. The first table row has a missing column, but is using the new attribute to duplicate it.
{{code|<xml>
+
<source lang="xml">
 
<table:table-row table:style-name="ro2">
 
<table:table-row table:style-name="ro2">
 
<table:table-cell table:style-name="ce2"/>
 
<table:table-cell table:style-name="ce2"/>
Line 34: Line 34:
 
<table:table-cell table:number-columns-repeated="1015"/>
 
<table:table-cell table:number-columns-repeated="1015"/>
 
</table:table-row>
 
</table:table-row>
</xml>}}
+
</source>
  
 
== Testing ==
 
== Testing ==
 
I ran the script over some large spreadsheets of around 10,000 rows and it worked well with no errors processing about 1000 rows per second.
 
I ran the script over some large spreadsheets of around 10,000 rows and it worked well with no errors processing about 1000 rows per second.

Latest revision as of 18:11, 22 May 2015

Repeated columns

A bug was found in the Open Office spreadsheet parser where some rows would have the wrong column count, this was finally isolated to a new attribute called table:number-columns-repeated which allows identical columns to be defined just once as shown in the snippet below. The first table row has a missing column, but is using the new attribute to duplicate it.

<table:table-row table:style-name="ro2">
	<table:table-cell table:style-name="ce2"/>
	<table:table-cell table:style-name="ce4"/>
	<table:table-cell table:style-name="ce6" office:value-type="string">
		<text:p>c</text:p>
	</table:table-cell>
	<table:table-cell table:style-name="ce8" table:number-columns-repeated="2"/>
	<table:table-cell table:style-name="ce9"/>
	<table:table-cell table:style-name="ce11"/>
	<table:table-cell table:style-name="ce12"/>
	<table:table-cell table:style-name="ce15" table:formula="of:=SUM([.I9:.I18])" office:value-type="time" office:time-value="PT38H30M00S">
		<text:p>38:30</text:p>
	</table:table-cell>
	<table:table-cell table:number-columns-repeated="1015"/>
</table:table-row>

<table:table-row table:style-name="ro2">
	<table:table-cell table:style-name="ce2"/>
	<table:table-cell table:style-name="ce4"/>
	<table:table-cell table:style-name="ce6"/>
	<table:table-cell table:style-name="ce8" office:value-type="string">
		<text:p>d</text:p>
	</table:table-cell>
	<table:table-cell table:style-name="ce8"/>
	<table:table-cell table:style-name="ce9"/>
	<table:table-cell table:style-name="ce11"/>
	<table:table-cell table:style-name="ce12"/>
	<table:table-cell table:style-name="ce15" table:formula="of:=SUM([.I10:.I19])" office:value-type="time" office:time-value="PT76H00M00S">
		<text:p>76:00</text:p>
	</table:table-cell>
	<table:table-cell table:number-columns-repeated="1015"/>
</table:table-row>

Testing

I ran the script over some large spreadsheets of around 10,000 rows and it worked well with no errors processing about 1000 rows per second.