Hello everyone, i a, stuck in situation where i want to write data to exel workbook in a from a datatable row by row in a specific column.I am shareing a screen shot of this format.I have to write data row in B2 and then C2 .......please help me otta this

Hi

Welcome to uipath forum

We can use write cell activity working for each row

Hope the below steps would help you resolve this issue

  1. Use a excel application scope and pass the filepath of the excel as input

  2. Let’s take you have a datatable already named dt

  3. Now inside being the excel scope use a FOR EACH ROW activity and pass dt as input

  4. Now inside that loop use a write cell activity where mention the input value as CurrentRow(“yourcolumnname in dt”).ToString
    And in cell range as
    “B”+(dt.Rows.IndexOf(CurrentRow)+2).ToString

  5. This will write the values in B column from
    Cell B2

  6. Next to this write cell use another write cell activity and mention like this
    For C column
    input value as CurrentRow(“yourcolumnname in dt”).ToString
    And in cell range as
    “C”+(dt.Rows.IndexOf(CurrentRow)+2).ToString

That’s it

Cheers @Trinity_Piyush

thank you @Palaniyappan

but its overwriting on only first row means the last rows data is storing and showing in the exel.
what to do?