Read & Write OpenOffice/LibreOffice Spreadsheet

Just starting out? Need help? Post your questions and find answers here.
collectordave
Addict
Addict
Posts: 1310
Joined: Fri Aug 28, 2015 6:10 pm
Location: Portugal

Read & Write OpenOffice/LibreOffice Spreadsheet

Post by collectordave »

Moving on from the creation of OO calc sheets I have now just about finished a module to read or write the calc sheets.

Included in the download is a small demo programme which will write a small sheet and read others.

The download is here:-

[url]http://www.mediafire.com/file/dszofwxlo ... p/file/url]

Can be improved please let me know how you get on.

Regards

CD

PS link changed here for the latest
Last edited by collectordave on Sat Nov 07, 2020 4:21 pm, edited 2 times in total.
Any intelligent fool can make things bigger and more complex. It takes a touch of genius — and a lot of courage to move in the opposite direction.
collectordave
Addict
Addict
Posts: 1310
Joined: Fri Aug 28, 2015 6:10 pm
Location: Portugal

Re: Read & Write OpenOffice Calc

Post by collectordave »

learnt a little mores changed how columns etc calculated and changed the interface to the module.

to me a little quicker and better.

new link is here

http://www.mediafire.com/file/dszofwxlo ... e.zip/file
Any intelligent fool can make things bigger and more complex. It takes a touch of genius — and a lot of courage to move in the opposite direction.
eck49
Enthusiast
Enthusiast
Posts: 153
Joined: Sat Nov 14, 2020 10:08 pm
Location: England

Re: Read & Write OpenOffice/LibreOffice Spreadsheet

Post by eck49 »

I like the look of this.

Is there a way to read a named sheet from the ods file?

I have many files with multiple sheets, and one day I would like to be able to interrogate them rather like a 4-dimensional tesseract, kind of FileName x SheetName x Row x Column, although the detailed structure is more complex than that.

PB would offer the flexibility once the first hurdle is overcome.

Not important for me, but of interest might be cell formats (colours, fonts, alignments, merges...) too, if you know how these are coded in ods. It's too deep for me!
Ubuntu 22.04 64-bit
Purebasic 6.00 (as of 5 Sep 2022)
(native tongue: English)
collectordave
Addict
Addict
Posts: 1310
Joined: Fri Aug 28, 2015 6:10 pm
Location: Portugal

Re: Read & Write OpenOffice/LibreOffice Spreadsheet

Post by collectordave »

Hi

I am looking at multi sheets at the moment seems it can be done but will require a lot of studying and testing first.

You can write the sheet name with this though so that is a start.

The idea I have at the moment is maybe produce a list of sheets to choose from then read that sheets data into the array.

The code is ready to expand but only sees text and number formats but numbers are stored as text.

I am working on something else at the moment but do intend to expand this.

CD
Any intelligent fool can make things bigger and more complex. It takes a touch of genius — and a lot of courage to move in the opposite direction.
Post Reply