Hi, I'm an open source believer but the Javascript API documentation - and how Google returns information about it - is shocking. I thought I'd do a ticket on my current commercial project using Open Office to test the water, I can more or less get the information I want from Calc etc, manipulate it, and then put it back into the doc ... the three areas I have not been able to find are:
1. Javascript: How to read all the text from a text file (from other applications) so that I can manipulate it and insert it into the document,
2. Javascript: How to write text to a text file to export JSON data to other applications, and
3. Javascript: How to pop up message boxes to the user so that he knows what is happening.
The great thing about using Javascript for an Open Office API is that the Javascript community is advanced and supportive, so for Javascript Macros to be successful this community really just has to be able to support OO integration - eg. reading text files, writing text files, reading and writing JSON objects to cells etc et al.
Any help on how to read a text file and write a text file? And to easily do a message box?
The answer to those questions should allow anyone to consume or generate JSON files.
I'd be very appreciative, I really don't want to have to fall back on MS Office, and with these three answers I think I'll be ok!
Please, no Basic or Python answers, I can do these things in both but my customers are Javascript savvy.
Kind regards, please forgive my constructive criticism, I don't have to push this technology but with a few tricks up my sleeve such as the answers to these questions, I think it's a good approach to take!
Anthony!
Javascript Macros: Read/Write Text File, MsgBox, the future!
-
- Posts: 1
- Joined: Sat Oct 19, 2019 7:05 pm
Javascript Macros: Read/Write Text File, MsgBox, the future!
NeoOffice 2.2.3 with MacOS 10.4
Re: Javascript Macros: Read/Write Text File, MsgBox, the fut
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
Re: Javascript Macros: Read/Write Text File, MsgBox, the fut
If Javascript doesn't have to tools to do it directly then you can open and save text files in Writer (and manipulate it and transfer it into another open document). You'll find plenty of Basic examples through a search for you to translate.
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
Re: Javascript Macros: Read/Write Text File, MsgBox, the fut
Exactly like you do with any other language.1. Javascript: How to read all the text from a text file (from other applications) so that I can manipulate it and insert it into the document,
Well, as a JavaScript developer you know how to generate JSON from objects, from XML or anything.2. Javascript: How to write text to a text file to export JSON data to other applications, and
Exactly like you do with any other language except StarBasic which comes with a helper.3. Javascript: How to pop up message boxes to the user so that he knows what is happening.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice