How to read and write ODF/ODS files (OpenDocument Spreadsheets)
page 2 of 6
by Josip Kremenic
Feedback
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 38116/ 126

ODF format

OpenDocument format supports document representation:

·         As a single XML document.

·         As a collection of several subdocuments within a package.

Office applications use second approach so we will explain it detail.

Every ODF file is a collection of several subdocuments within a package (ZIP file), each of which stores part of the complete document. Each subdocument stores a particular aspect of the document. For example, one subdocument contains the style information and another subdocument contains the content of the document.

This approach has following benefits:

·         You don’t need to process entire file in order to extract specific data.

·         Images and multimedia are now encoded in native format, not as text streams.

·         Files are smaller as a result of compression and native multimedia storage.

There are four subdocuments in the package that contains file’s data:

·         content.xml - Document content and automatic styles used in the content.

·         styles.xml - Styles used in the document content and automatic styles used in the styles themselves.

·         meta.xml - Document meta information, such as the author or the time of the last save action.

·         settings.xml - Application-specific settings, such as the window size or printer information.

Besides them, in package can be many other subdocuments like document thumbnail, images, etc.

In order to read the data from an ODF file you need to:

1.    Open package as a ZIP archive.

2.    Find parts that contain data you want to read.

3.    Read parts you are interested in.

On the other side, if you want to create a new ODF file, you need to:

4.    Create/get all necessary parts.

5.    Package everything into a ZIP file with appropriate extension.


View Entire Article

User Comments

Title: Read from .ods   
Name: .ods
Date: 2011-06-14 9:48:22 AM
Comment:
in asp.net i cannot view data from .ods file.
but i can view from .xls
Title: Read ODS Data   
Name: Cuong
Date: 2010-07-22 4:52:40 PM
Comment:
\
Title: Read ODS Data   
Name: pdvbalaji
Date: 2010-06-24 10:30:52 AM
Comment:
Hi,
Thank you I am searching for this for a long time ,but I am getting on issue ,when I am reading from .ods file in dataset I am getting some cells are empty plz tell me how to solve this problem. I am using .net2.0 and open office 3.1. I am waiting for your replay .my email id pdvbalaji@gmail.com
Title: Read ODS Data   
Name: pdvbalaji
Date: 2010-06-24 9:39:37 AM
Comment:
Hi,
Thank you I am searching for this for a long time ,but I am getting on issue ,when I am reading from .ods file in dataset I am getting some cells are empty plz tell me how to solve this problem. I am using .net2.0 and open office 3.1. I am waiting for your replay

Product Spotlight
Product Spotlight 





Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2021 ASPAlliance.com  |  Page Processed at 2021-04-16 10:46:40 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search