I’m trying to create a list and then export it to Excel. I’ve created my own headers and used the List.AddItemToFront which gives me my desired result.
The issue is with my other data. I can’t seem to figure out how to line it up under my headers. It tends to put all the values in the same column instead of under my headers.
Any suggestions?
Use List.Create
instead of List.AddItemToFront
. Excel data inputs should be sublists where each sublist represents a row and each item in the sublist represents a column in that row.
Yup that was it. Of course it was something easy like that.
Thanks so much Nick.
Now I’m just trying to get greedy and take it a step further which seems to be breaking it.
I was then going to list the group names in the applicable columns but that seems to break it and the data no longer wants go vertically in the excel table.
Any ideas? Thanks again.
Maybe you need to transpose the data lists too?
As per Kirk’s advice, your data does appear to be in the wrong orientation.
To add to this, your data appears to be of uneven length as well, so I’d suggest adding the header rows to the front of the major data matrix. This way your uneven segments are added first (e.g. your ‘number of groups’ 1 off field).