Quantcast
Channel: UiPath Community Forum - Topics tagged error
Viewing all articles
Browse latest Browse all 4384

How the read a specific row in excel and copy it into another excel file

$
0
0

Hello Community-guys,

i need some help i think, because i didn’t find a solution until now.

What i want is, when the robot reads an excel file, he should stop at a specific row, copy all the row items (for example all the values from A5 - T5) and paste this row under the headline of a new excel file sheet.

How did i do it until now:
Inside an Excel Application scope, i read the hole sheet. When the robot is at the 5th row/line, he should copy the row. I have created a second read range inside the “for each row”-activity. My idea is, to copy the range A5-T5 into another datatable and put the values with the “write range”-activity into another Excel-File, BUT only when the specific rows/lines are read. In that case, i have a second Excel-Application Scope inside the for each row, with the write range.

Here is a screenshot. The Read-Range in the if is ““A” + DBTransaktionsjournal.Rows.IndexOf(row).ToString + “;T” + DBTransaktionsjournal.Rows.IndexOf(row).ToString”

But i always become the error-massage: Read Range: Object reference not set to an instance of an object. I don’t know why. My brain has stopped.

I don’t know if my way is the best/efficient way. What i don’t what is, to assign all the values to a variable and write it. There must be a simpler and better solution.

Thanks in advance for the replies and helps.

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 4384

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>