Path: csiph.com!eternal-september.org!feeder.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: Ben Bacarisse Newsgroups: comp.lang.javascript Subject: Re: Script in a Spreadsheet - how? Date: Tue, 11 Sep 2018 15:46:38 +0100 Organization: A noiseless patient Spider Lines: 30 Message-ID: <87pnxkay7l.fsf@bsb.me.uk> References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: reader02.eternal-september.org; posting-host="df6651e9079694b35132afeb7718dcbc"; logging-data="18439"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/7yx4Z7WuzkthXljfAC+rNg8q8O6g3FKI=" Cancel-Lock: sha1:UNA+WR5+7YUaK0UssfMGAPQlfL4= sha1:fljJL6KwfkDj7CJrkOZTjd1BZVY= X-BSB-Auth: 1.2fa98165173c64adfcf2.20180911154638BST.87pnxkay7l.fsf@bsb.me.uk Xref: csiph.com comp.lang.javascript:35595 Julio Di Egidio writes: > On Tuesday, 11 September 2018 10:31:22 UTC+2, Dr J R Stockton wrote: >> Script in a Spreadsheet - how? >> >> I want to enter numbers manually in columns B and D, >> with column C row N then being calculated as >> C[N] = C[N-1] + B[N] - D[N] >> until line N is empty or otherwise marks the end - >> and I have no idea how to code that in a >> spreadsheet. > > Are you kidding?? You don't need any scripting for that simple formula. > > Anyway, LibreOffice does not support JS scripting, only some BASIC: > > says otherwise. To the OP: You probably don't need scripting. This short of thing is usually done by copying a formula, though scripting it can make it automatic. And I've never had much luck with JavaScript and LibreOffice calc. I've not tried hard, but even the examples seem to go wrong. I suspect the API is not maintained in the same way that Basic one is. -- Ben.