Date: prev next · Thread: first prev next last
2026 Archives by date, by thread · List index


Den sön 1 mars 2026 kl 17:05 skrev Johnny Rosenberg <gurus.knugum@gmail.com
:



Den sön 1 mars 2026 kl 15:37 skrev Regina Henschel <
rb.henschel@t-online.de>:

Hi all,

Calc provides a function INFO. Do you actually use INFO?

No, I actually didn't know about it…
I actually looked for a way to detect what operating system is used, and I
think I ended up just checking the existence if some common paths to
determine what operating system is used, usually to prevent the macro to
run if not Linux. I guess I could run INFO() in a macro with
"com.sun.star.sheet.FunctionAccess", couldn't I? I guess I'll try that next
time.


I'll answer myself…
Yes, it works. I made a new global function that I can use in my macros,
like this:

Public Function Info(sParameter As String)
Dim CalcFunction As com.sun.star.uno.XInterface
CalcFunction=createUnoService("com.sun.star.sheet.FunctionAccess")
Info=CalcFunction.callFunction("INFO", Array(sParameter))
End Function

Sub Test
Print Info("system")
End Sub

Prints LINUX in my case.

Great! Thanks!


Kind regards

Johnny Rosenberg






If yes, which
parameter do you use? What do you do with the function result?

Well, if I would use it I think I would only be interested in
INFO("system"), but who knows?



Kind regards,
Regina

--
To unsubscribe e-mail to: users+unsubscribe@global.libreoffice.org
Problems?
https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy



-- 
To unsubscribe e-mail to: users+unsubscribe@global.libreoffice.org
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.