Write range start at specified row issue

Please, help needed with write range, specifying starting cell.
I have a worksheet as template, which is copied to destination sheet. The template has formatted headers which I need to retain. I have filtered datatable whose values need to be populated in template with proper formatting. The format it that, the first for rows are merged, then table rows start at row 5. In excel application scope, i am using write range, specifying the starting cell and worksheet. The starting cell i specify A6,which is to row right after the table header. The issue is, only one (first) column is populated in resulting sheet. The rest of the columns are not populated. column 2, 3 & 4 are not populated, even though the have values.
However, If I don’t use the template, then create new file, all columns are populating, but I have formatting issue, like merging cells,font-size, etc.
Expected result is: Starting at sixth row, all columns should be populated from datatable results.

That sounds strange I am not able to reproduce anything alike. Are you able to share your formatting Excel workbook?

Sure @OpalSnow reportTemplate.xlsx (226.0 KB)

Rows 1,2,3 are empty because, they are variable for source.
Ideally, I am scraping an html table with that formatting, to generate the report.

The problem is your Excel formatting worksheet.

You have merged cells A6:F6 and thousands of rows below row 6. When merging A6:F6 they become one and the same cell. This means that cell references to A6, B6, C6, D6, E6 and F6 all point to the same cell. You’re using UiPath to write to these cells so it keeps overwriting the same cell.

I have attached the same Excel sheet but I have unmerged A6:F6. If you use this workbook you should notice that all of these cells will be populated with data.

reportTemplate.xlsx (223.3 KB)

Your fix is fairly simple. Unmerge the cells and format differently. You’re using columns A:F for “Supervisor Name” and G:M for “Employee Name”, etc. Make it such that column A is used for “Supervisor Name”, column B for “Employee Name” and so forth.

PS: I am quite curious. Is the cell value in A6 the value of the first or last column of your DataRow?

1 Like

Ok. I will create a new template. A6 is the value of first column in my data table and so on.