[Solved] Macro to read data from xlsx and write to ods

Creating a macro - Writing a Script - Using the API (OpenOffice Basic, Python, BeanShell, JavaScript)
Post Reply
croko
Posts: 5
Joined: Tue Mar 12, 2019 10:09 pm

[Solved] Macro to read data from xlsx and write to ods

Post by croko »

Later edit: Thanks guys, I did it myself after learing from other posts on this forum.

I have an excel Source.xlsx file with text and number data.

I want to open the excel file with the last version of OpenOffice (4.1.4) and run a macro in OpenOffice Calc that will take the data from my excel file and put in a new OpenOffice Spreadsheet file (.ods format).

This mean that the macro should run in OpenOffice Calc and create a new .ods file and populate it with data from the excel file I have open in OpenOffice Calc when I run the macro.

Attached is the detailed brief with an an example of the excel source file and the OpenOffice Calc destination file. Please note the password for the Destination.ods file is: test111
Attachments
Brief for macro in OpenOffice - 2019.06.06.pdf
(66.39 KiB) Downloaded 572 times
Source.xlsx
(16.65 KiB) Downloaded 376 times
Destination.ods
(25.2 KiB) Downloaded 403 times
Last edited by croko on Tue Jun 18, 2019 12:54 pm, edited 1 time in total.
LibreOffice 6.x on Windows 10
User avatar
RusselB
Moderator
Posts: 6646
Joined: Fri Jan 03, 2014 7:31 am
Location: Sarnia, ON

Re: I pay for macro to read data from xlsx and write it to o

Post by RusselB »

last version of OpenOffice (4.1.4)
This is no longer correct. The latest release of OpenOffice is 4.1.6

As you are wanting to take information from a .xlsx file and put it into a .ods file, rather than use a macro, have you considered using LibreOffice
LibreOffice has a higher level of compatibility with the later Microsoft versions (eg: .xlsx rather than .xls)
OpenOffice 4.1.7, LibreOffice 7.0.1.2 on Windows 7 Pro, Ultimate & Windows 10 Home (2004)
If you believe your problem has been resolved, please go to your first post in this topic, click the Edit button and add [Solved] to the beginning of the Subject line.
croko
Posts: 5
Joined: Tue Mar 12, 2019 10:09 pm

Re: I pay for macro to read data from xlsx and write it to o

Post by croko »

RusselB wrote:have you considered using LibreOffice
Thanks for the recommendation, now I switch to LibreOffice.
But I still need to use a macro in order to automate the process because the real source file have thousands of rows.
LibreOffice 6.x on Windows 10
User avatar
robleyd
Moderator
Posts: 5056
Joined: Mon Aug 19, 2013 3:47 am
Location: Murbko, Australia

Re: I pay for macro to read data from xlsx and write it to o

Post by robleyd »

Seems this is much more complex than simply converting xlsx to ods; there is an amount of processing and formatting specified.
Cheers
David
OS - Slackware 15 64 bit
Apache OpenOffice 4.1.15
LibreOffice 24.2.1.2; SlackBuild for 24.2.1 by Eric Hameleers
User avatar
RoryOF
Moderator
Posts: 34586
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: I pay for macro to read data from xlsx and write it to o

Post by RoryOF »

If this is a one off application it might be worth trying a conversion service such as http://www.zamzar.com
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
User avatar
RusselB
Moderator
Posts: 6646
Joined: Fri Jan 03, 2014 7:31 am
Location: Sarnia, ON

Re: I pay for macro to read data from xlsx and write it to o

Post by RusselB »

Zamzar might be an acceptable option, even if this is gping to be something on going.
The first limitation I can see is the size of the .xlsx file that Zamzar would be working with.
There are file size limits for all but the highest paid accounts.
OpenOffice 4.1.7, LibreOffice 7.0.1.2 on Windows 7 Pro, Ultimate & Windows 10 Home (2004)
If you believe your problem has been resolved, please go to your first post in this topic, click the Edit button and add [Solved] to the beginning of the Subject line.
Post Reply