Excel File only receives the last element for a row

Hi everyone,

I’m trying to use ReFramework to read some PDF Invoices, then extract information using Regex and then save this information to an Excel file, but only the information from the last invoice is being written into the Excel file.

Can you please tell me what i’m doing wrong? I’m new and currently studying everything related with RPA and UiPath

Thanks in advance

Hi @diazgdev !
Welcome to UiPath Community :smile:
In write range are you using the same datatable as the one you are adding datarows to ?


Yes, it actually generates the Excel file with the headers, but only with the information of the last read pdf file


Alright would you mind sharing your workflow ?

How are you adding the rows to the datatable?

Hello @diazgdev ,

You should have an Add data row activity in your flow.
If extracted information is correct, the status is successful, so the add data row should be there, in set stats flow.

As mentioned by others, a share of your flow , is possible, will be great.


Hi, everyone and thanks for your responses.
This is how I’m writing the information to the datatable, I guess here is where I’m wrong

And here is my process.xaml file:

Thanks a lot

Hello @diazgdev ,

Maybe you should create the dtoutput datatable in the Initialization, which means only 1 time you initiate it. Right now, for each invoice you create a new datatable, since you have it in the Process flow.

Other than this, should be OK. Anyway, usually I write to Excel or to datatable, in the Set Status transaction, depending on the status …

Just an idea.


At the same time, you should put some log messages, to see how the things are logged.
Usually I add log messages during development, but I delete most of them when I send it to production.

Thank you, Vasile.
I’ve created the dtoutput datatable in the init stage, but now I don’t know how to ‘connect’ it to the process stage. I know these are noob questions, but I just have 1 month working with RPA and UiPath. Thanks a lot for your help!

Use the datatable as argument.

Also, I recommend to search for videos in Academy/Youtube…