How to give datatable as input to append range activity?

I want to append data table to next empty row of excel sheet with the help of append range activity. Please Help
Thanks

Hi @RpaNoobMax

Check out the documentation

Regards
Gokul

HI @RpaNoobMax

Try this

  • read the excel file in which you are going to appened and store in a dt
  • In the Append after range give the range like
Excel.Sheet("SheetName").Range("A"+(Dt.rows.Count+1).ToString)

Regards
Sudharsan

@Sudharsan_Ka
Thanks for reply,
but, How to provide datatable as input. it takes only (IReadRangeRef) datatype as input.

@RpaNoobMax

Regards
Sudharsan

@Sudharsan_Ka
To append data to excel sheet, I need to provide datatable as input, you mentioned location of cell address which data should start appending.

But I want to pass datatable as input.
01

@RpaNoobMax

You can use excel append range activity you dont need to define anything just give the datatable there it will automatically append in the last line

If you don’t fine this activity
Go to filter-> Enable classic and now search for this append range activity
image

Regards
Sudharsan

1 Like

NOte : I have shown you example you need to

read the data you need to append and append the data in the output file not the same file

Regards
Sudharsan

HI @RpaNoobMax

Instead of using Modern activities Used Classic activity it will very easy to achieve the output

  1. Use Excel Scope Application

  2. Use Read Range activity

  3. Use Append Range activity

image

Note : In the Classic activity → You can alsoe having the Workbook activity like Read Range and Append Range activities.

image

Hope it will helps

Regards
Gokul

1 Like

ok Thanks @Sudharsan_Ka,

I wanted to append with modern excel activity. It takes Input as (IReadRangeRef) data type. I was Hoping to get answer for converting Datatable to (IReadRangeRef) data type.

Okay try like this @RpaNoobMax

Excel → Main Excel
Excel1-> The output excel in which you need to append

Regards
Sudharsan

@Sudharsan_Ka
here you are directly appending from one excel sheet to another. In my case Data-Table is created from Dictionary

Hi @RpaNoobMax ,

Could you maybe try using the Write Datatable To Excel Activity using Append enabled.
image

Let us know what is the outcome.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.