I Run a bot it check the data in terminal and store the value in excel. here i give the row and column number, but i need when i run a bot it check the value and store in the next row.
Is your problem with writting data to excel? Is it overwriting the data in excel?
In that case you can do several things…
You can either use append range activity or you can use the write range activity with the exact row number specified in range property.
In order to get the next available row count,l
If you are writting data in a for each loop, use a counter variable that increments in every iteration. And use it in the range property of the write range.
If you are not writting in a loop, then you can do a simple read range activity to read the content of the excel into a datatable. The. You can get the number of rows by datatable.rows.count
. Assign that to a variable. Then you can use it in the range property in the write range to write the data in the next row
Hope it helps… let know how it goes for you
when i run my bot it get the value from putty terminal and store the data into excel sheet.
here i mention some value 1,2,3,4 the values is when i run my bot today it fill the data into 1,2. then i run my bot in next day it fill the value in 3&4 place. how i do this… now i get the data from terminal but i cant store the data into particular cell.
Hey there @SriRam
I’m really sorry for my late replies… Wonder how i missed your post
Anyways, I have a solution to your problem. I have actually created a small sample that works for your scenario… I have also included comments in the workflow so you can understand how and why I have used each activity… It will basically check for the next available row in each run and add the data there without overwriting the existing data…
You may need some tweaks since you have multiple column headers… What you need to do is, to increment the range counter… Don’t get confused just by reading this I have added comments in all relevant places… what you need to do is, just just need to change how it should increment… for example increment by 1, 2, 3 or 4 anything
Check out the workflow and the attached excel… it works fine here…
Let me know how it goes…
WorkSheet.xlsx (8.3 KB)
Main.xaml (9.6 KB)
HI @SriRam,
Since I didn’t hear from you again, Just thought of checking in to see whether my solution helped you to get your task done?
Thanks
Lahiru
when i try to execute the excel file it shows the error like “Error Opening file. Make sure Excel is installed”. here i use WPS office.
You get the error because Excel Application Scope activity requires MS Excel to be installed in the computer.
If you are unable to get it installed, the best option that I can think of is to write is by using Write Range in Workbook activities…
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.