Excel Automation2

Hi Team
I want to read reference no row 1 input then download a file with the help of that 1 row input and write the amount and then go to 2 reference no and same process
if there is no reference no then skip , I have attached for better understanding
image

What is the issue you’re facing?

Not able to build the logic Can you provide me a logic for this

Hi @Kuldeep_Pandey

  1. Excel Application Scope
    WorkbookPath: [Path to Excel file]

  2. Read Range
    Range: [SheetName or Range]
    Output: dataTable

  3. For Each Row: row in dataTable

  4. If: Not String.IsNullOrEmpty(row(“ReferenceNo”).ToString())

  5. Then:
    [Download file using reference number]
    [Write amount to the downloaded file]

  6. End If

  7. End For Each Row

Hope it helps!!

What I have to write to read refernce row in for each ? only output variable?

  • Use Read Range to extract the data from the 1st and 2nd lines
  • Extract the Column names (excluding the 1st) as a list of String
  • Do a For Each loop on this list, and for each item find the corresponding Reference No. as yourDataTable.Rows(1)(currentItem), then download and update the corresponding document, and do a Write Cell to update the amount for that specific column

and also I have to read refernce no because for download file i have to give this no
How can i do this?