How to write data in Excel file without overwriting?

Hello,
I am working on Excel right now, and just started Uipath these days.
I want to know how to make Excel without overwriting and also i do not know where is the firstplace to put data. By which i mean, always change the point of first place.
Sorry about my English.
I need your help, thank you.

You can use Append Range activity incase you need to add extra data

I made Append Range activity but i really do not know why it did overwrite.
no1

Hi @1000_Yukino ,

Two ways to do this.

1 - Use UiPath Append Activity which you told not working for you.
2- Get last row of excel and do + 1 and use write range activity to put your data table in it.

hi @1000_Yukino

Use read Range work book to read a excel file
Then use output of the read Datatable and Check Count Using the below Function
Dt.Rows.count
If the Count is > 0
Then—>Use append Range to write the data in Excel.
else—> Use write Range to write the Data in Excel.

Regards

1 Like

I do not know where is the last row of excel…sorry

1 Like

Hi @1000_Yukino

I think you are using ‘Write Range’ instead of ‘Append Range’.

Please find the below screen shot, In Append Range activity it will never ask range.

image

Thanks. Happy Automation.

Feel free to reach us at any time if you have doubts.

1 Like

Thank you for replying me.
Maybe is it like this?

1 Like

Am i doing right?
So you mean if i add them, i can add excel data without overwriting and also put data from new cell by which i mean first place which i want to put data always changing.For examle, i could be B61 but next time is maybe B66, like this… is it make sence?

Thank you for replying and helping me
no2

But this can be figure out by reading that excel file and get row number of last row.
Use invoke code or macro to get last row.

@1000_Yukino

Please use only the ‘Append Range’ activity, it will append the data next to the data that already exists in excel.

For eg: If your excel have data till A61, append range will write the data from A62.

Thanks.

Thank you for replying me.
So first, if i use macro, where should I put? Maybe below Assign?
Second, what should i put inside of macro?

Thank you.
So maybe you mnea delete Write Range and just put Append Range?

1 Like

Yes @1000_Yukino

1 Like

InvokeCode.zip (9.3 KB)
Use get Last Row workflow from zip file.
I have hard coded path in invoke code just give your file path.

1 Like

Sorry to late you reply.
I guess i did what you told me but looks like it did not works.Maybe overwrite agian?
Thank you for helping me, agian.

Thank you for sharing code, but i really do not know how to use Invoke… because i just started UiPath last month. I tried but i could not do that.maybe you have other way to solve my ploblem?If you have, could you teach me agian please?Sorry about that.

Don’t know really why i have error message, but maybe becasue I am useing Read Range on the top of this page?

This is the error of read range I believe.

Let create one video for you to get last row from excel if that works for you.

If it is possibe, i would love to.

1 Like