72
Views
2
Comments
Solved
[Advanced Excel] how to write data column wise, not row wise (eg. A1, B1, C1. etc)
advanced-excel
Service icon
Forge asset by Carlos Freitas
Application Type
Reactive

Hello All,

I'm using AdvancedExcel from Forge to write data into excel. 
I was thinking maybe is it possible to write data in excel file but column wise. For eg. using Cell_Write in A1, then B1, then C1, D1 etc until the structure ends. 

I can write in a particular column for lets say 10 rows, like mentioned here in my answer. But I can't do the same for writing column wise.

Why am I doing this when there is Cell_WriteRange ?
Unfortunately due to a certain error that I raised here, I'm unable to get proper data into excel. It prints the last row as the 2nd row. So I was thinking maybe I'll use Cell_Write again to print the first row after headers (i.e. 2nd row). I can loop through the columns A2, B2, C2 etc until structure ends. But since column names are text, I can't make them as counter and append 1 after every loop. 

I was thinking of manually creating separate variables with column names (A,B, C...) but if there is a lot of data this is not a good approach.

Please help. Any suggestion will do. 


Thanks,

Aman

2024-04-15 16-08-47
Aman Devrath
Solution

Only way to solve this was hard coding the column names in Cell Value parameter in Cell_Write.


2022-08-03 04-32-50
Ravi Punjwani

Hi Aman,

Cell_WriteRange is only better option. I saw your post but there was no reply after I suggested to debug.

Did you try debugging? What was the result? Can you create a small application to demonstrate that problem? I'll be able to debug at my end to help you out if you are able to provide an OML file showing the problem in your other post.

2024-04-15 16-08-47
Aman Devrath
Solution

Only way to solve this was hard coding the column names in Cell Value parameter in Cell_Write.


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.