Addon Question.....
First off, this script is so much smoother than the traditional Copy/Paste macro.
I discovered this macro will only transfer (numberical) values, where a formula (string) was required.
A simple change to the script solves that issue, but for one of the strings I need it to be (pasted as) unformated text.
Im at a loss how to achieve this for this script
Code: Select all
Sub GetL4_String
oSheet1 = ThisComponent.Sheets.getByName("Sheet1")
CellL4 = oSheet1.getCellrangeByName("L4")
Val_L4 = CellL4.String
CurrSheet = ThisComponent.CurrentController.ActiveSheet
CellB3 = CurrSheet.getCellrangeByName("B3")
CellB3.String= Val_L4
end sub
EDIT: I think this might be achieved if a RANGE of cells with strings could be transfered, but altering the "L4" to "L4:P4" isn't doing this.
Also, assuming the secondary cells should match in size of the primary, altering "B3" to "B3:F3" also isnt working
The error i get with this as a RANGE of cells is
Method Not found:String for the line
Val_L4 = CellL4.String