Write Excel in row direction

I know this is a rudimentary question, but I have a question.
Currently, I have information that I want to write in rows, as shown in the first image, and the information I want to write is as shown in the second image. How can I write the information in rows in Excel?
The cells to be written are combined as shown in the image.

This works for your example. You would have to insert spaces between your header values in order to add blank columns between each header column. Also, look at “List.Transpose” for structuring list data to excel.


Thanks for the reply.
I took your advice and wrote out the list structure as @3@2@1 and it worked well.


I have one more question.
I would like to export data across columns to Excel.
The structure of the data is @3@2@1 as shown in the image.
How can I export the data obtained as shown on the left side of the image to look like the Excel sheet on the right side of the image?
I would appreciate it if you could help me.

Since you have three sets of values and only one header and you need blank columns between the headers, it would be easier to import the headers separately from the data. Again you will need to have empty values in the list between each header. The number of empty values will determine the number of blank columns. Combine all three of data lists together into one list with each set of values in an individual sub-list. The sub-list will be in order by sequential column placement. Then transpose the data as shown.


Writing to Excel always uses the same table format. Each sublist represents a row and each value in the sublist represents the column value in that row. All you’re ever doing with Excel is structuring your data to match that format.

If you have data in columns, then you usually just need to transpose that data to then represent the rows.

1 Like