Reading Openoffice Calc (.ods) programmatically using c#?
Asked Answered
E

3

6

I want to know if it is possible to read OpenOffice Calc spreadsheet programatically with c#, I can do this for Excel(.xls and .xlsx) but unable to find a solution for reading calc spreadsheet.

Help me if anyone has solution.

Expire answered 3/4, 2012 at 8:25 Comment(0)
I
3

ODF .NET - It works for c# and you can read and write.

Says like this on there page:

ODF .NET allows you to write applications to create, modify and parse text documents and spreadsheets. Supports all versions of .NET Framework, .NET Compact Framework and Mono.

Illiteracy answered 3/4, 2012 at 8:30 Comment(0)
L
1

If you want to work directly against a headless OpenOffice/LibreOffice instance to manipulate the spread sheets, you are going to need to use OpenOffice/LibreOffice component interface UNO. This is a bit of a pain because of the casts that are required in strongly typed languages (UNO has bindings for many languages), deny you of the tooling you would expect unless you find a C# OpenOffice set of wrapper classes. There are other frameworks to manipulate the document but to work with it via OpenOffice directly this is the only way.

Here is some example code of someone creating an xls spread sheet with c#: Use OpenOffice Uno CLI with C# to create a spreadsheet

Here is the OpenOffice UNO reference: http://www.openoffice.org/api/docs/java/ref/overview-summary.html

Lise answered 6/4, 2012 at 0:27 Comment(0)
T
1

You should have a look at the GemBox.Spreadsheet component from GemBox that supports XLSX, XLS, CSV, ODS or HTML file format.

There's both a free and a paid version of it.

Troutman answered 28/1, 2013 at 16:1 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.