Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How do you close LibreOffice Calc from a macro?

I am writing a shell script that runs a macro on a specified document in LibreOffice Calc. After the macro is ran, I would like Libre to automatically close. However, if I try to kill Libre from the script, it just crashes and freezes up instead of closing, so I was wondering if it might be possible to just run some command at the end of the macro that would close LibreOffice. I also tried running it in both headless and invisible mode, but I must've had a misunderstanding of what they do, because all they did was prevent any dialogue boxes from popping up instead of actually preventing Libre from pooping up. If it helps any here is the line from the shell that starts Libre, opens the file, and runs the macro: soffice "macro:///Standard.SaveCSV.Main" $1

All help is appreciated!

click to hide/show revision 2
reformat for clarity/code

How do you close LibreOffice Calc from a macro?

I am writing a shell script that runs a macro on a specified document in LibreOffice Calc. After the macro is ran, I would like Libre to automatically close. However, if I try to kill Libre from the script, it just crashes and freezes up instead of closing, so I was wondering if it might be possible to just run some command at the end of the macro that would close LibreOffice. LibreOffice.

I also tried running it in both headless and invisible mode, but I must've had a misunderstanding of what they do, because all they did was prevent any dialogue boxes from popping up instead of actually preventing Libre from pooping up. If it helps any here is the line from the shell that starts Libre, opens the file, and runs the macro: macro:

 soffice "macro:///Standard.SaveCSV.Main" $1

$1

All help is appreciated!