I have found a few threads regarding how to automate calc, but i was not able to get something running at all.
Get the error message:
Code: Select all
---------------------------
Myscript.ahk
---------------------------
Error in #include file "c:\Bat\TestCalc.ahk":
0x80080005 - Starten des Servers fehlgeschlagen
Line#
185: Sleep,%t%
186: if !debugsleep
187: Return
188: Sleep,%debugsleep%
189: ToolTip
190: }
192: {
---> 193: objServiceManager := ComObjCreate("com.sun.star.ServiceManager")
194: objCoreReflection := objServiceManager.createInstance("com.sun.star.reflection.CoreReflection")
195: oDesk := objServiceManager.createInstance("com.sun.star.frame.Desktop")
196: args := ComObjArray(VT_VARIANT := 12, 2)
197: oDoc := oDesk.loadComponentFromURL("private:factory/scalc", "_blank", 0, args)
198: oSheets := oDoc.getSheets()
199: }
072: {
Continue running the script?
---------------------------
Ja Nein
---------------------------
connect to a currently open calc window
find out which cell is currently focused
read the numeric content of that cell (even if the cell contains a formula)
Multiply by 2 and write the numeric result (no formula) into the cell immediately below
Save the modified spreadsheet without closing it.
thank you!