I would like the bot to write to the last empty line in Excel

i want the easier way

1 Like

@Soudios

Check this out

Main.xaml (5.3 KB)

1 Like

@Soudios

This also may help you:Append range to a specific column - #7 by Lahiru.Fernando

1 Like

if i do that i will erase the first row i wrote, what i want i write on the last empty row

1 Like

Append Range is an append - it doesn’t overwrite existing data

1 Like

ok but how can i write from specific column with apprend

1 Like

@Soudios,

What exactly do you want?

I understood that you have a column (let’s say F). Then, when you have the first empty cell (let’s say that the first empty cell is F12) you want to paste your copied row there?

Am I right?

1 Like

@gustavo.cervelin

Not exactly :

I copy the whole line from excel 1 then I paste it in excel 2 from column F, later I may come again to paste a new line in excel 2 but I do not want to overwrite the first line I pasted

1 Like

You shouldn’t be copying and pasting rows from excel sheets, read them both into DataTables and manipulate the data that way - in memory.

Ok @Soudios

I need few more details to understand.

Where do you want to paste this first time? F1, F2, first empty cell in F column?

Here @gustavo.cervelin

1 Like

Then you need to add 5 empty columns to the datatable, before the existing columns.

in fact its a template and the 5 first column are not empty

1 Like

You are saying you want to write the row to the Excel file starting at column F (column 6). So add 5 blank columns to the datatable before the columns that have data. Then when you write it to Excel, it’s technically writing the first 5 columns, but they are blank. The real data will then start in column F (6).

Do you have a sample plz ?

1 Like

Hi @Soudios

I’m still confused and not sure what you want to do.

So, let’s go…

You have you first excel and you copy a row from there, let’s say it has two columns. Just like this:

image

Do you want to paste those values in the first empty F cell? Like this:

image

Could you describe all possible scenarios, please? Feel free to share some screenshots of you second Excel file… you can show us the “before automation runs” and the “after automations runs” of all possible scenarios.

Then, I’ll be able to share a soluion with you

Thanks!

hi @gustavo.cervelin

Yes exactly

1 Like

Hi @Soudios,

Please, take a look at the attached file. I think it is what you are looking for.

Main.xaml (7.1 KB)

If this solves your problem and you agree, kindly mark this post as solution to close this topic.

If you need extra help and/or have any question, please let me know :slight_smile:

Thanks!

i tried an other solution that’s you count the number of row on the excel and you add +1

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.