How to read and write data to file excel

Hi All,

Please help to guide the activity for the read and write data to file csv

First : I need to read the source file csv Name ABC.xlsx by start Row and column number to first free Row and Column number Or copy to fist free Row and Column number (-)

Next : Write destination file Excel Name DEF.xlsx on the first fee Row and Column number

Note : This activity loop every days

Next : Write destination file csv Name DEF.csv on the first fee Row and Column number

**
**

Hi @Chanwit ,

Does the data you want to Copy from the ABC Sheet start always at the 11th row ?

If so, when using Read Range Actvity you can Set the Range as A11 with Add Headers Unchecked. You will get an Output as Datatable.

Then, It does seem that you would want to Append this Data to the Sheet DEF, in that case, you could use Append Range Activity with the Datatable value from the Output of Read Range Activity of ABC Sheet.

Thanks @supermanPunch , Great activity however i need to cut the row data End

3333

@Chanwit , We can make use of the Assign Activity for that case to Simply Ignore the Last Row of the Datatable like below :

AbcDT = AbcDT.AsEnumerable.Take(AbcDT.Rows.Count-1).CopyToDatatable

You could then use Append Range Activity with this Modified AbcDT datatable.

@supermanPunch ,

I mistake ?

@Chanwit , You need to use the Datatable Type variable not the String variable. The Output of Read Range Activity needs to be used in place of AbcDT. I think it’s dt in your case.

@supermanPunch please help agin mistak for Argument “Value” the name does norexist in the current context

@Chanwit , Change it to the below and Check :

dt = dt.AsEnumerable.Take(dt.Rows.Count-1).CopyToDatatable

@supermanPunch Sorry

@Chanwit , Looks like to use that Method there needs to be some modification in your xaml file.

However, Instead of using that Assign Expression, you can do the following :

image

You can use the Remove Data Row Activity and remove the Last row i.e dt.Rows.Count-1