incubator-odf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob Weir <>
Subject Re: How to get the last row in a table
Date Tue, 05 Jun 2012 12:56:29 GMT
On Tue, Jun 5, 2012 at 7:07 AM, Minto van der sluis <> wrote:
> Hmm, might be related to my spreadsheet. I have a spreadsheet that was
> downloaded from google docs (converted from google's native format).
> Initially it had:
> rows: 100000+
> columns: 1024
> After opening and saving the document. It contains:
> rows: 100
> cols: 1024
> This is still far to much for my table of 5 columns by 12 rows.
> For comparison a new empty table gives the following:
> rows: 2
> cols: 5

I see this happening in spreadsheet editors quite often.  They save
the ODF file with a much larger span of cells than actually have

One thing you can do to verify this is rename the ODF document from
*.ods to *.zip.  Then you can use any ZIP utility to look inside.  The
main file will be content.xml.  If you look at that file you will see
how your editor actually defined the table.

> Anyone an idea why I get these high numbers? Or is google docs the cause?

I think the idea was for the editor to leave room for user to easily
add new content into the sheet.  If it saved it as exactly how much
was used, then the next time the document was retrieved, the table
would be shrunk to exactly that size.  So if the user wanted to add
new content they would need to first append or insert new rows and
columns, not a very good user experience.   Of course, we have the
opposite expectation with tables in a text document.


> Regards,
> Minto
> Op 5-6-2012 12:19, Minto van der sluis schreef:
>> Hi,
>> Having looked at several places I can't find an answer to this simple
>> question.
>> Table.getRowCount() gives me a number far to high for my little table
>> with < 50 rows.
>> Regards,
>> Minto
> --
> ir. ing. Minto van der Sluis
> Software innovator / renovator
> Xup BV
> Mobiel: +31 (0) 626 014541

View raw message