Ask Your Question
0

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

asked 2013-09-17 17:28:43 +0100

Porteño gravatar image

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.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2014-12-29 11:45:44 +0100

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 :)

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2013-09-17 17:28:43 +0100

Seen: 1,804 times

Last updated: Dec 29 '14