How do I assign a cell's contents to a variable?

If possible I would like to know how to assign the value of the variable “salute”, which is “Hello, world” to the cell C5 and to the cell (6,3) with the minimal possible syntax use.

I am experienced in VBA and can’t figure how to do this with LibreOffice Basic.

Thanks.

first : sorry for the bad english T_T

Welcome to BASIC !

I’m newbie too but for this you must precise the type of content of your destination cell :

CellDest = YourSheet.getCellByPosition(2,4) ' yes row and line start at 0 then A=0, B=1, C=2 etc.
CellDest.String = salute
CellDest = YourSheet.getCellByPosition(5,2)
CellDest.String = salute

It exists also : CellDest.Value and CellDest.Formula .
Good luck :slight_smile: