ODS to XLSX
Your spreadsheet never leaves your browser, and nothing is downloaded to make this work. An ODS is a ZIP of XML and your browser can already unzip; the rest is reading.
The same spreadsheet, in the format Excel opens without complaint.
LibreOffice writes ODS and Excel prefers XLSX, and that is the whole reason this page exists. The values come across; the formulas do not, because what is stored beside each formula is its last answer and that is what is read. The sheet keeps its name.
The one thing OpenDocument does that nothing else does
An ODS does not store a thousand empty
cells. It stores one cell and a count:
table:number-columns-repeated. That is a sensible way to keep
a file small, and it means a row that looks like three cells may be three
hundred columns wide.
It gives two opposite ways to get a spreadsheet wrong. A cell repeated five times in the middle of a row means everything after it sits five columns further along — so a converter that ignores the attribute puts every later column in the wrong place. Silently. In a file that opens perfectly in LibreOffice. A column of numbers ends up against the wrong names and nothing looks amiss.
And LibreOffice pads every row out to the full width of the sheet, so a three-column table ends with a repeat in the thousands. Expand that literally and four values become a sixteen-thousand-column table. Both are handled here, and both are tested against odfpy — with the naive answer worked out alongside and checked to be different, because a test that would also pass with the broken version is not a test.
A formatted number is not its own text
Every cell carries two things: what it is and
what it shows. A cell holding 1200 formatted as currency stores
office:value="1200" alongside a display string of
“1,200.00” or “£1,200”. Read the display and
every formatted number in your file becomes a string with a comma in it,
which sorts wrongly and adds up to nothing. The value is what is read;
for dates, where the displayed form is usually the one you typed, that is
kept instead.
What does not come across
Formulas. A spreadsheet stores the last answer beside each formula, and the answer is what is read — which is what you were looking at, and all a table can hold. Colours, column widths, merged cells, conditional formatting, charts and pivot tables do not come across either. A table is the values and their shape.
It does not open .sxc, the OpenOffice 1.x format from before
OpenDocument, and it says so rather than failing quietly. If you hand it an
.odt or an .odp it will tell you which it is and
point at the right page.
Where to go next
- ODS to CSV — the same sheet, another way
- ODS to HTML — the same sheet, another way
- ODS to Markdown — the same sheet, another way