OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

call macro from command line that is in a oocalc file

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Calc
View previous topic :: View next topic  
Author Message
plwm2
Newbie
Newbie


Joined: 19 Jul 2011
Posts: 2

PostPosted: Tue Jul 19, 2011 4:52 am    Post subject: call macro from command line that is in a oocalc file Reply with quote

Hi,

Being a very recent user of OpenOffice and having looked through various forum pages, I can't find the solution to my problem which is this:

I've got a spreadsheet called File.ods which has a macro called "Standard.PeterIOMod.PeterIO" which reads in a csv file and outputs a csv file.
However, I want to be able to call this macro from a linux command line. I found out that the following command seems to work:

oocalc "File.ods" "macro://File/Standard.PeterIOMod.PeterIO"

However, this opens the oocalc GUI, and then calls the macro, but it doesn't _close_ the GUI. Of course, I can just kill the oocalc process, but this is far from ideal because I need to call the macro _repeatedly_ from a bash script. Also, I would prefer if the GUI were kept invisible (i'm told that the "-invisible" flag does the trick - however, it doesn't seem to work).

I would be eternally grateful for a swift response!

Thanks in advance.

Peter
Back to top
View user's profile Send private message
Robert Tucker
Moderator
Moderator


Joined: 16 Aug 2004
Posts: 3407
Location: Manchester UK

PostPosted: Tue Jul 19, 2011 5:00 am    Post subject: Reply with quote

Looks like it may be a Windows problem:

http://user.services.openoffice.org/en/forum/viewtopic.php?f=5&t=22548
http://user.services.openoffice.org/en/forum/viewtopic.php?f=6&t=4941
_________________
OpenOffice 4.0.0 and LibreOffice 4.x.x on Fedora 20, Ubuntu 13.10, Windows 8.1 Preview (Triple Boot)
Back to top
View user's profile Send private message
plwm2
Newbie
Newbie


Joined: 19 Jul 2011
Posts: 2

PostPosted: Tue Jul 19, 2011 6:01 am    Post subject: Reply with quote

Well, in windows command line, I have no such problem because the original spreadsheet is in Excel - and I've got it working perfectly by using a visual basic script to do the opening and closing (and invisibly). However, I need to get it working in Linux - and calling "oocalc -invisible -nologo -headless -norestore" doesn't open oocalc invisibly, and further, oocalc won't close from command line without just simply killing it.

The above is not absolutely essential - another acceptable solution for me would be to open the oocalc document, but from call the macro from Linux command line repeatedly, and then close oocalc manually. If only I could get this to work...
Back to top
View user's profile Send private message
Robert Tucker
Moderator
Moderator


Joined: 16 Aug 2004
Posts: 3407
Location: Manchester UK

PostPosted: Tue Jul 19, 2011 7:02 am    Post subject: Reply with quote

Do you have the openoffice.org-headless package installed?
_________________
OpenOffice 4.0.0 and LibreOffice 4.x.x on Fedora 20, Ubuntu 13.10, Windows 8.1 Preview (Triple Boot)
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Calc All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group