i want the easier way
This also may help you:Append range to a specific column - #7 by Lahiru.Fernando
if i do that i will erase the first row i wrote, what i want i write on the last empty row
Append Range is an append - it doesn’t overwrite existing data
ok but how can i write from specific column with apprend
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?
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
You shouldn’t be copying and pasting rows from excel sheets, read them both into DataTables and manipulate the data that way - in memory.
I need few more details to understand.
Where do you want to paste this first time? F1, F2, first empty cell in F column?
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
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 ?
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:
Do you want to paste those values in the first empty F cell? Like this:
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
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
i tried an other solution that’s you count the number of row on the excel and you add +1
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.