How do I populate multiple cells from a macro function in Libre Calc from a csv string?
Sample function
Function GetCsv
Dim csvData As String
csvData = "column1,column2,column3" & Chr(10) & "1,2,3" & Chr(10) & "4,5,6" & Chr(10) & "7,8,9"
GetCsv = csvData
End Function
I'd like to call the function in cell A1 and in this example have A1:C4 populated with the data. What is the best way to achieve this?
Are you asking about splitting a text string into individual rectangular array elements? I would write it like this:
and call it from cell with formula like