How to create ODS documents in .Net
Asked Answered
C

1

2

I'm going to convert an existing C# project, which writes an Excelfile with multiple tabs, to write ODS documents instead. I can open the existing Excel files in Open Office and convert them there, but this isn't a good solution in the long run.

Anybody know of any existing (preferably free/open source) API's that let you do this? Or if not, a not too complex How-To?

Convention answered 25/6, 2010 at 8:50 Comment(0)
W
1

Open Office is open source and has some section of its code that turns an internal representation into an ODS file. That is not only the definitive API, it is likely the only one. Whether or not it is easy to use or well documented is another question. I'm currently downloading the 1.2GB of source and may have a more complete answer in a bit.

update:

With 146k files spread over 15k directories, not including the 70 major third-party libraries included only by reference, I'm not even going to try to wrap my head around it. Fortunately, the developer's documentation looks better than I would have expected. Do note that OO has to be able to read Microsoft XLS files and their bastard OfficeXML files so there is already much code in there that does half or more of your work for you.

You have a good piece of work ahead of you. On the other hand, done well, your code could be quite valuable to the world as a whole. Since you will be deriving your work from open source, I strongly suggest you get managerial approval to pass your work back to the OO team, as they would be able to make best use of it. Since the OO source is covered by the LGPL it is not required that you make your work available (unless you publish / distribute your derivative) it would still be a Good Thing to do.

Waistline answered 25/6, 2010 at 10:8 Comment(3)
Open Office is Open Source - but it's also java, which I'm not that familiar with (the project is c#). I'm gonna keep on searching for now I guessConvention
That is not only the definitive API, it is likely the only one. Happy hunting.Waistline
likely doesn't mean there isn't others :)Convention

© 2022 - 2024 — McMap. All rights reserved.