[Solved] Macro for copy datas from more files in another one

Keyboard macros or custom scripts

[Solved] Macro for copy datas from more files in another one

Postby savezin » Sun Feb 07, 2021 5:43 pm

Good evening,
I ask you for help, because I have been trying for days, but I have not come out of it. :to knock:
I created a calc oo model for filing jobs, my idea was to group data from the various tabs, all inside another calc file as accounting, USING A MACRO.
I know that it would be much easier to use a database, but the problem is that oo for android (system I would like to use it on) there is no database.
So I would like to use Calc.
I am attaching the files to get an idea for the macro.
My idea was to merge several files created by the PROVA NUOVA.ods in (C: / USERS / UTENTE / DESKTOP /) folder and with a macro, inserted in the CONTABILITà MENSILE.ods file, extrapolate the data present in cells B3, F3, P3, of the SCHEDA page of the PROVA NUOVA.ods file and put them in cell A7 of CONTABILITà MENSILE.ods
Is there any pious soul who could help me out?
Thanks in advance
Attachments
PROVA NUOVA.ods
(22.14 KiB) Downloaded 68 times
CONTABILITA MENSILE - Copia.ods
(14.98 KiB) Downloaded 65 times
Last edited by Hagar Delest on Sat Feb 27, 2021 8:11 pm, edited 2 times in total.
Reason: tagged solved
andr openoffice 4.6.0 android e win10pro
savezin
 
Posts: 7
Joined: Thu Feb 04, 2021 6:01 pm

Re: Macro for copy datas from more files in another one

Postby Bidouille » Sun Feb 21, 2021 4:29 pm

You must use DataArray property to do this.
Try a search with "insert from sheet", you will find some examples.
User avatar
Bidouille
Volunteer
 
Posts: 440
Joined: Mon Nov 19, 2007 10:58 am
Location: France

Re: Macro for copy datas from more files in another one

Postby Villeroy » Sun Feb 21, 2021 5:09 pm

Configurable solution for all types of spreadsheets and csv: Merge sheets of spreadsheet documents
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
User avatar
Villeroy
Volunteer
 
Posts: 29729
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Macro for copy datas from more files in another one

Postby savezin » Sat Feb 27, 2021 5:29 pm

Thank you Villeroy, your solution is exactly what I was looking for, but I followed your instuctions and the macro imports all the data that there are in files. Is there an option to import only some cells value on the same line,in order to have only one line pro imported data file and no more lines?
thank you for the help
andr openoffice 4.6.0 android e win10pro
savezin
 
Posts: 7
Joined: Thu Feb 04, 2021 6:01 pm

Re: Macro for copy datas from more files in another one

Postby Villeroy » Sat Feb 27, 2021 5:44 pm

Very easy: Add an export sheet referencing the values you want to export.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
User avatar
Villeroy
Volunteer
 
Posts: 29729
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Macro for copy datas from more files in another one

Postby savezin » Sat Feb 27, 2021 6:08 pm

Villeroy wrote:Very easy: Add an export sheet referencing the values you want to export.

THANK YOU VERY MUCH, IT IS WORK CORRECTLY. :super:
andr openoffice 4.6.0 android e win10pro
savezin
 
Posts: 7
Joined: Thu Feb 04, 2021 6:01 pm


Return to OpenOffice Basic, Python, BeanShell, JavaScript

Who is online

Users browsing this forum: No registered users and 9 guests