Read and modify openoffice / libreoffice spreadsheets

Share your advanced PureBasic knowledge/code with the community.
Kulrom
User
User
Posts: 16
Joined: Thu Sep 07, 2023 6:07 am

Re: Read and modify openoffice / libreoffice spreadsheets

Post by Kulrom »

blueb wrote: Fri Jul 26, 2024 4:12 pm Hi Kulrom

I'll having issues with 6.11 LTS (x64) on line 347
Apparently some changes in: AddPackMemory(zip_out, 0, 0, entry_name$)
Doesn't seem to like zeros

Hi, blueb!

I haven't installed version 6.11 yet. I'm using version 6.10. New versions are coming out too often :)

My mistake was here: instead of AddPackMemory(zip_out, 0, 0, entry_name$) I needed to use the more suitable function AddPackDirectory(zip_out, entry_name$) to create directories inside the archive.
Apparently, something changed in Packer Library in 6.11. Everything should be fine with AddPackDirectory().
I posted a new version of the module in the topic.
I love programming languages that start with the letter "P":
Python, Pascal and ... PureBasic! :)
Kulrom
User
User
Posts: 16
Joined: Thu Sep 07, 2023 6:07 am

Re: Read and modify openoffice / libreoffice spreadsheets

Post by Kulrom »

v 0.4.5 fixed ODS::GetCellValue() - fixed returned result if link in cell 11/10/2024
I love programming languages that start with the letter "P":
Python, Pascal and ... PureBasic! :)
User avatar
blueb
Addict
Addict
Posts: 1111
Joined: Sat Apr 26, 2003 2:15 pm
Location: Cuernavaca, Mexico

Re: Read and modify openoffice / libreoffice spreadsheets

Post by blueb »

Thanks for the updates.. it's appreciated. 8)
- It was too lonely at the top.

System : PB 6.21(x64) and Win 11 Pro (x64)
Hardware: AMD Ryzen 9 5900X w/64 gigs Ram, AMD RX 6950 XT Graphics w/16gigs Mem
Quin
Addict
Addict
Posts: 1131
Joined: Thu Mar 31, 2022 7:03 pm
Location: Colorado, United States
Contact:

Re: Read and modify openoffice / libreoffice spreadsheets

Post by Quin »

Nice, keep up the good work! :)
Kulrom
User
User
Posts: 16
Joined: Thu Sep 07, 2023 6:07 am

Re: Read and modify openoffice / libreoffice spreadsheets

Post by Kulrom »

Hello everyone! I am posting two updates at once. While working with the module, problems with cells in which the text has several lines or styles were detected.
Now GetCellValue() returns the entire text.
Using SetCellValue(), you can write multi-line text to a cell. The separator is the line break character (~"\n")

Code: Select all

; v 0.4.6 fixed ODS::GetCellValue()  - fixed returned result if type is "percentage"
;		  added constant #percentage  for write values in percents  14/10/2024
; v 0.4.7 fixed ODS::GetCellValue() - fixed returned results if multirows and multiformated text in cell 15/10/2024
;         modify ODS::SetCellValue() - added the ability to write multi-line text
Updated code in the start message!
I love programming languages that start with the letter "P":
Python, Pascal and ... PureBasic! :)
Kulrom
User
User
Posts: 16
Joined: Thu Sep 07, 2023 6:07 am

Re: Read and modify openoffice / libreoffice spreadsheets

Post by Kulrom »

i am posting update

Code: Select all

; v 0.5.0 The internal mechanism for allocating memory has been changed. It is now a list
;		Added ODS::freeAndNull() -  The macro clears the memory and resets the variable.
; v 0.5.1 Fixed ODS::SaveOdsBook() - added support PB version < 611
Updated Module in first message
I love programming languages that start with the letter "P":
Python, Pascal and ... PureBasic! :)
User avatar
idle
Always Here
Always Here
Posts: 5839
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: Read and modify openoffice / libreoffice spreadsheets

Post by idle »

thanks this is great to have for PB.
Post Reply