Doubt in Excel automation


Hello guys, i ve done a Web Scrapping of some values and i have written it in an Excel file, saving it also in a Data Table.

My doubt is: how can i get the last cell (value) of each row, save it like in an array or something, and see if each of that values stored is bigger or not that 2000. If it is less than 2000 i did a sequence to write in NotePad.



if your datatable’s last cell is always at the same column(all rows have the same amount of cells), you can do the following:
For Each row in myDT.Rows
if (row.Item(“myLastColumn”) < 2000)
Write row.Item(“myLastColumn”) to notepad



@Topi can you pls help with this?
how to download excel from a location (say google)
do some modifications and email to some one?



The download part can be done just as a human would do it. For example, Open browser- activity with the url to the file and then read the file in an Excel Application scope. The default download location in English Windows is “C:\Users”+ Environment.UserName +"\Downloads\myExcel.xlsx". If the name of the excel is not known you can check for files ending with *.xlsx and if found open that. Directory.GetFiles(“path”, “pattern”) returns a string array of all the paths found.

Depends on the modifications you want to make. I usually prefer reading the excel- data in to a DataTable with Read Range activity. Then do the required modifications to the DataTable and write it in to a new excel file.

Sending an email is pretty straightforward. If you are using Outlook use the Send outlook mail message and in the attachments add your newly modified excel -file path.

If this was too confusing, let me know and I can try to make a sample workflow.



Thank you it was informative. but being beginner It would be great if you can help me more in this.

Can you kindly create a simple workflow for my requirement?
Everything should be automated.
1.Download excel file by name “Forbes Global 2000 - 2014.xls - Macrofocus” from google
2.from the excel sheets sort companies by country and get display comapanies from only “United states” and save
3.Then email to some from outlook.



Here is an example that creates a new sheet in the same excel file that has only US items.
Main.xaml (14.2 KB)



Thank you so much…So kind of you.Though its not throwing any error. There is no email sent.
Pls look into this.


The email To-address I put there was just some random example. Use your own/colleagues email there for example.



Yes… I did change it. But no rmail


Do you have Outlook installed and an account set up on your conputer?



Yes , I did set up…


@Topi thank you so much its working. Appreciate your patience and your time to help.