Text functions (i.e. Left) in recorded macros return nothing

Creating a macro - Writing a Script - Using the API (OpenOffice Basic, Python, BeanShell, JavaScript)
Post Reply
Vult-r
Posts: 2
Joined: Fri Dec 02, 2016 3:21 pm

Text functions (i.e. Left) in recorded macros return nothing

Post by Vult-r »

Hello everybody, AOO newbie here.

I'd like to automate some processes in my company and I'm trying to create a Calc document that [MACRO1] imports data from a CSV document into a new sheet (off-topic question: is it not possible to import the data into an existing sheet?) and [MACRO2] automatically fills an earlier prepared sheet with data from the new one. [MACRO2] is executed by pressing a button I created after the completion of [MACRO1].

Simply referencing cells from the new sheet works fine [(=Sheet1.$W4)] but anything more than that [(=UPPER(LEFT($F4;FIND("@";$F4)-1))] returns an empty cell. I've been trying to deal with this problem for two days now and I'm at my wits' end so I turn to you folks.

I attached a modified file cleared off sensitive information if that helps.

Sample text funtions I would like the macro to execute are:
=UPPER(LEFT($F4;FIND("@";$F4)-1))
=UPPER(REPLACE(Arkusz1.$N4;1;FIND("@";Arkusz1.$N4);$ZZ$1))
=REPLACE(Arkusz1.$P4;1;4;$ZZ$1)
=REPLACE(Arkusz1.$R4;1;4;$ZZ$1)
=CONCATENATE($I4;"+";$J4)

I appreciate any help you can provide.
Attachments
test_doc.ods
(19.57 KiB) Downloaded 111 times
Apache OpenOffice 4.1.3 (Polish)
AOO413m1(Build:9783) - Rev. 1761381
2016-09-29 02:39:19

Windows 7 Home Premium 32-bit (6.1, 7601)
User avatar
Zizi64
Volunteer
Posts: 11361
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Text functions (i.e. Left) in recorded macros return not

Post by Zizi64 »

There is not any macro code in your example document.

Note: The macro recorder has a very limited capability. You need study and use the API functions.
(Write your macros but not record them.)
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
Vult-r
Posts: 2
Joined: Fri Dec 02, 2016 3:21 pm

Re: Text functions (i.e. Left) in recorded macros return not

Post by Vult-r »

Thank you for the quick reply, I was afraid that would be the case since there is little time.

Attached is the code recording the macro generated.
Attachments
recorded_macro.txt
(15.08 KiB) Downloaded 97 times
Apache OpenOffice 4.1.3 (Polish)
AOO413m1(Build:9783) - Rev. 1761381
2016-09-29 02:39:19

Windows 7 Home Premium 32-bit (6.1, 7601)
User avatar
Zizi64
Volunteer
Posts: 11361
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Text functions (i.e. Left) in recorded macros return not

Post by Zizi64 »

recorded_macro.txt
:crazy: :knock:
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
Post Reply