How to update Remark in Excel file specific column from first used cell till last used cell

I am trying to update the Remark as “Success” in the column “O” from just below last updated cell (O2) till last used cell in Column B (B9).

image

Hi @nilesh.mahajan

U can use this appraoch

  1. Read the excel and store in dt1

  2. then try with write cell

“O”+(dt1.AsEnumerable().Select(Function(row) row(“Remarks”).ToString).Where(Function(r) r<>“”).Count+2).ToString+“:”+“O”+(dt1.AsEnumerable().Select(Function(row) row(“Remarks”).ToString).Where(Function(r) r<>“”).Count.ToString)

Hello Nived,

thnc for reply, I have tried this method, but it gives me error.

image

Can u check whether remarks column is there or not ?

With your screenshot - I think, you have not defined the remarks column in the data table (if you used build a data table). if you passed your excel sheet to create a DT out of it, then it should be a spell mistake or something like that.

Actually I dont want to get the Remark column from any DataTable, I have created an New excel file and in that file want to update the status as “Success” whose Column name will be Remark. I want to fill the exactly the same number of cells which is blank according to Column B value.
Suppose in B Column 10 newly records updated then I need to update the remark in column O for exactly for that 10 records only.