Problem with rows and columns in excel automation

Hello,

How to automatically increase row and column count ? I want to fill an excel sheet row wise. In every row, I am getting column values from different tables but I want the data entry in column to be automated. For example using for each row, when row value=1, I want to fill data into column from A1 to M1. Here M1 marks the end of column. Then I want to go to second row automatically and again start filling data from A2 to M2 and so on till I reach the end of some row value (Assume 10th row).

How to I go about?
Do suggest some ideas.

Thanks in advance!!
Tamshi

ExcelPyramid.zip (10.8 KB)

Hi @Tamshi This is similar but not exact…Here it create a pyramid in excel with the value u have entered…Please consider and find there the logic for Row,Column counts with 2 for each loops inner and outer…Inner: Col.count Outer: Row.Count…
Hope it helps u…
:slight_smile:

@tamshi
Instead of filling an excel sheet row wise, you can first build a datatable from the data that is available with you, once you have a complete datatable with you, you can push the complete datatable into an excel sheet.
This will be faster as you will deal with the excel application only once.

Thanks @sankar.kuna for the help!!! Through your workflow now I am able to figure out how I need to go about.

Thanks @Bharat_Kumar for the suggestion. My use case is such that for each cell I am getting the values from different sheet of an excel file. So every time in order to read those data, I need to specify different locations. So data is available in different sheets but I want to write them in a single sheet starting from row1 and proceed cell by cell from A1 to Z1 and so on…