Re: OpenOffice Calc

2018-03-02 Thread Martin Groenescheij
Why don't you save the data in a CSV file first and then import it into your spreadsheet? Set the delimiter to ';" and make sure you change a locale that use the "," as a decimal separator. Much easier to calculate averages, sums etc. On 03/03/18 8:57 AM, Павел wrote: Good afternoon! Sorry

Re: OpenOffice Calc

2018-03-02 Thread Антон Борисов
You can define custom formula https://wiki.openoffice.org/wiki/Custom_functions Anton Borisov сб, 3 марта 2018 г., 1:57 Павел : > > Good afternoon! > Sorry for my bad english. > I propose a new formula for the OpenOffice Calc application. > = FINDN (A; B; C; D), where > FINDN (A; B; C; D) - disp

Re: OpenOffice Calc Javascript Function

2015-03-15 Thread Igal @ Lucee.org
got it, thanks. it's possible that I had tried to use Ctrl-S instead of Ctrl-N. I am trying to call one function from another, but I guess I need to "import" it somehow first? I have that same JSLib1 module in the user location, and in it two functions: StringContains(input, substring, isCaseSe

Re: OpenOffice Calc Javascript Function

2015-03-15 Thread Bernard Marcelly
Igal @ Lucee.org a écrit le 2015-03-15 20:41 : it works. thank you Bernard! one last question -- how do I get the libraries to "refresh"? when I make a change to the libraries, sometimes it's visible immediately, and some times I need to close OpenOffice and re-open it in order to make sure th

Re: OpenOffice Calc Javascript Function

2015-03-15 Thread Igal @ Lucee.org
it works. thank you Bernard! one last question -- how do I get the libraries to "refresh"? when I make a change to the libraries, sometimes it's visible immediately, and some times I need to close OpenOffice and re-open it in order to make sure that the new code is running. is there a better wa

Re: OpenOffice Calc Javascript Function

2015-03-15 Thread Bernard Marcelly
Sorry, correction of my correction... if the JavaScript script is in My Macros the location becomes user oDocScriptProvider.getScript("vnd.sun.star.script:Library1.ExistsTerm.js?language=JavaScript&location=user") The URI spec of the Scripting Framework is somewhat complex...

Re: OpenOffice Calc Javascript Function

2015-03-15 Thread Bernard Marcelly
Correction: if the JavaScript script is in My Macros the location becomes application oDocScriptProvider.getScript("vnd.sun.star.script:Library1.ExistsTerm.js?language=JavaScript&location=application") Bernard Marcelly a écrit le 2015-03-15 14:56 : On 3/13/2015 6:09 AM, Bernard Marcelly wrot

Re: OpenOffice Calc Javascript Function

2015-03-15 Thread Bernard Marcelly
On 3/13/2015 6:09 AM, Bernard Marcelly wrote: - Create in your document a JavaScript library named Library1 You created the macro in OpenOffice application (My Macros), not in the document. If you really want to have your macro in My Macros, you have to change the call to the macro: oDocScri

Re: OpenOffice Calc Javascript Function

2015-03-14 Thread Igal @ Lucee.org
hi Bernard, thank you for your reply. I created a javascript library named "JSLib1" and in it a macro named "StringContains", and I placed in it your example JS code. then in OpenOffice Basic Macros I have the module "Module1". you can see the code at https://gist.github.com/TwentyOneSolution

Re: OpenOffice Calc Javascript Function

2015-03-13 Thread Bernard Marcelly
Hi, If you intend to use a JavaScript function in a cell formula, forget about it. First, you cannot directly call a JavaScript function from a cell formula. The formula should call a Basic function that calls the JavaScript function. Second, the formula will provide an error at document loading

Re: OpenOffice Calc Javascript Function

2015-03-13 Thread Andrew Pitonyak
Trivial to do in basic. If the macro is visible you can call it from calc. Might be the same with JavaScript. Is your problem understanding how to write something calc sees or what to put in it? On Mar 13, 2015 1:50 AM, "Igal @ Lucee.org" wrote: > > Hi all, > > I want to write a simple functi