[UNO, Calc] How to fill spreadsheets cells programmatically

Forum rules
No question in this section please
For any question related to a topic, create a new thread in the relevant section.
Post Reply
User avatar
Villeroy
Volunteer
Posts: 31269
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

[UNO, Calc] How to fill spreadsheets cells programmatically

Post by Villeroy »

Example spreadsheet with text and formulas explaining methods get/setString, get/setValue, get/setFormula, property FormulaLocal, get/setDataArray, get/setFormulaArray and get/setArrayFormula. The contained Basic code consists of user-defined functions exposing the formula properties of example cells as they are seen by the UNO programmer. This helper code is not directly related to the explained concepts. You are the programmer to implement the outlined concepts by your own in your preferred programming language.
Put this document into a trusted directory set in menu:Tools>Options>Security>Macro Security and read. Ask any questions in the Macro and UNO forum.
Attachments
UNOCellContents.ods
get/setString, get/setValue, get/setFormula, property FormulaLocal, get/setDataArray, get/setFormulaArray, get/setArrayFormula
(27.13 KiB) Downloaded 1566 times
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
Post Reply