2
Is it possible for me to make a system call in order to calculate a cell value in LibreOffice Calc?
To clarify, can I set a cell's formula to something like this:
=B3*C4-system("/my/amazing/script B3 C5")
where the contents of cells B3
and C5
would be sent to /my/amazing/script
as arguments?
This makes Calc immune to this CSV exploit
– Dan Dascalescu – 2018-01-11T02:35:02.533I tried that on Linux but it didn't work.
Function VOL(a, b, c) VOL = Shell("/usr/bin/gnome-calculator", 1, a+b+c, false) End Function
, then=VOL(1,2,3)
produced '0' and didn't run the calculator. Replacing 1 with 4 orfalse
withtrue
didn't help. – Dan Dascalescu – 2018-01-11T02:50:32.377@DanDascalescu: Generally, it seems that the SHELL() command doesn't recognize STDOUT or the exit code of the executed command. To handle this, you may use the clipboard, as described in this answer. Regarding your example: try
– tohuwawohu – 2018-01-11T08:45:17.837Shell("/usr/bin/gnome-calculator", 1, "-e " + a, false)
, with a as String = "1+2+3". This should open the calculator with the equation 1+2+3 ready to calculate.