How to find Last used cell in Excel

Hello,

Can anyone please advice how to find last used Cell into Excel sheet, i need to Copy and paste data.

Hi @nm09011985

1.Read the data in a datatable.
2. Use assign Newrange=Datatable.rows.count
to get the number of rows
3. New row : A+(NewRange+1).toString

Mukesh

@nm09011985,

Last used cell?

Or Last cell written with data, read that excel as a datatable, then convert the datatable columns count to excel column name, then add the row numbers+2, it is the last range used in the excel.

Hello Mukesh,

thnx for reply. i tried to do the activity as per your suggestion, but its not happening.
attached is the excel file from where i want to move second row from Input sheet into Success sheets after last used row.WO Template_Gaud South.xlsx (18.6 KB)

@nm09011985 Can you please clarify everytime you needs to take only second row from the input sheet ?

Yes Indra, everytime only second row need to move from Input sheet.

@nm09011985

            1) First read  the excel file with sheet name **Input**  let us assume **dt**
            2) Append this **dt** to  the sheet name **Sucess**

Here is a zip file ExcelAppend.zip (34.8 KB)

Try this and let me know for further help.

Hello Indra,
there might be data already available in sheet Success so this dt will replace that.
i used CopyPaste method as per attached there in Destination cell i just need to find last used cell+1 and put this row there.Last Cell.7z (32.8 KB)

hey @nm09011985,

try this

image
here
‘range’ is integer variable and its evaluating next immediate row after last used row

Hey Prafull, its working for me.
thnx for help.

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