Sign in to follow this  
Followers 0
settecplus

Copying data from csv to ods

6 posts in this topic

Hi!

I'm facing a problem which my limited programming experience seems preventing me to solve...

I have a bunch of .csv files. I managed to open them, remove unnecessary stuff and combine them together. SO I ended up with a big single .csv containing all of my data. Now i need to import that content to a specific sheet inside a Libreoffice's Calc file. I've found the  OOoCOM_UDF_v08.au3 UDF, but honestly I'm having an hard time interpreting it's working... I found a couple of examples but none of them was conclusive... The point is I can read the whole .csv to an array, but how do i send it to the Calc document, splitting each column's content by its ";" ?

Is there anybody willing to help somehow? I can't even attach an example file because I'm really stuck in nowhere !

Luc

Share this post


Link to post
Share on other sites



Don't know too much about OpenOffice/LibreOffice. But with Microsoft Excel you would simply start Excel and pass the CSV file. Excel automatically imports it.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

Thank you water. Libreoffice works the same way, but what I'm trying to do is automating the whole process, so in the end I just have to open the Calc file and the content is already there. Keep in mind the data it's been processed in the meantime by the script.

Luc

Share this post


Link to post
Share on other sites

I'm not sure I get what you want. But if you use something like this in your script:

Run("..path to OpenOffice\calc.exe file.csv")

wouldn't it do what you need?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

Already tried that route. Two problems: first, I need a way to import the csv into a specific sheet of the Calc file. Second, but less important, that wouldn't make the process unattended, because it would open the import dialog requiring input from the user. Not a big deal the latter issue, but a big one the first.

Luc

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Then you need one of the UDF functions.

Or search the forum for "Open Office calc". Maybe you'll find some code which can be at least a starting point.

Edited by water

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0