Reputation: 71
How do I convert the VBA
With Worksheets("Sheet1")
.Range("A1:A10").Copy
.Range("D1").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
End With
to LibreOffice Basic with Option VBASupport 1
I thought this would work but PasteSpecial is not working the same way as it does in Excel and I can't see any pattern.
Upvotes: 0
Views: 369
Reputation: 2529
You can code it like this
With ThisComponent.getSheets().getByName("Sheet1")
.getCellRangeByName("D1:D10").setDataArray(.getCellRangeByName("A1:A10").getDataArray())
End With
Upvotes: 1