Skip to content
swatzy edited this page Apr 6, 2016 · 7 revisions

Sheet

"<table:table" and "</table:table>" is sheet node

"<table:table-row> and </table:table-row>" <--- 1st statement gives the total number of columns (need to test this)

Then it goes table:table-row...that consists of table:table-cell (s)

cells that are identical get a table:number-columns-repeated="xx"

Rows that are repeated get a table:number-rows-repeated="xx"

We should load a template.ods, parse the sheets into an array of table:table xml pages and arrays of values and types, we should also parse the header and footer.

the xml page will get deleted if the data gets changed, this will need recreating when the page is saved.

methods should be

  1. Create Document
  2. Load Template
  3. Add Sheet
  4. Update Sheet
  5. Get Sheet
  6. Get Sheets
  7. Save ODS
  8. Open Document
  9. Close Document

1. Create Document Just initialise

2. Load Template Load a template ODS from filepath, parse it into XML sheets and data, maybe save template to temporary file and link to that.

3. Add Sheet Insert new sheet, check the name for uniqueness, input the sheet index perhaps to allow some control about where sheets are added

4. Update Sheet Replace all of a sheets data with new data, add sheet if it doesn't exist, xml would get deleted and an empty xml entry could be used to force a create xml task.

5. Get Sheet Input a sheet name to pull out all sheet data

6. Get Sheets Only pull out an array of strings for all the sheets.

7. Save ODS For any sheet with no xml, create the xml and add to the header and footer text from the template. Replace the content.xml from the tmp template.ods and store in required location and name.

8. Open Document Open existing document

9. Close Document Close a document and all its references

Clone this wiki locally