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

Creating a macro - Writing a Script - Using the API

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

Postby croko » Thu Jun 06, 2019 6:37 pm

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 223 times
Source.xlsx
(16.65 KiB) Downloaded 206 times
Destination.ods
(25.2 KiB) Downloaded 205 times
Last edited by croko on Tue Jun 18, 2019 12:54 pm, edited 1 time in total.
LibreOffice 6.x on Windows 10
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

Postby RusselB » Thu Jun 06, 2019 8:44 pm

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 and LibreOffice 6.3.3.2 on Windows 7 Pro & Ultimate
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.
User avatar
RusselB
Moderator
 
Posts: 5607
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

Postby croko » Fri Jun 07, 2019 8:40 am

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
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

Postby robleyd » Fri Jun 07, 2019 9:54 am

Seems this is much more complex than simply converting xlsx to ods; there is an amount of processing and formatting specified.
Cheers
David
Apache OpenOffice 420m2(Build:9821) - Slackware 14.2 - 64 bit
LibreOffice 6.0.7.3 - Slackware 14.2 - 64 bit
Apache OpenOffice 4.1.4 - Windows 7 Virtual machine
User avatar
robleyd
Moderator
 
Posts: 3039
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

Postby RoryOF » Fri Jun 07, 2019 9:57 am

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.7 on Xubuntu 18.04.3 (mostly 64 bit version) and very infrequently on Win2K/XP
User avatar
RoryOF
Moderator
 
Posts: 29778
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

Postby RusselB » Fri Jun 07, 2019 5:18 pm

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 and LibreOffice 6.3.3.2 on Windows 7 Pro & Ultimate
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.
User avatar
RusselB
Moderator
 
Posts: 5607
Joined: Fri Jan 03, 2014 7:31 am
Location: Sarnia, ON


Return to Macros and UNO API

Who is online

Users browsing this forum: No registered users and 6 guests