How to read an excel attachment from outlook then input that data into a third party system?


#1

pls help me


#2

Will answer in short, start with ‘Get Outlook Mail Messages’ activity and using an If condition to match the subject look for the Email that may have those attachments. Use ‘Save Attachments’ to save the your excel file to a particular position.

Your second part of the question may be too long and would need more details to answer. :slight_smile: However your can use Read Range activity to read the table under the excel and store it in a datatable. This datatable can then be retrieved according to your requirement in your third party system.

Let me know if it helps.

Thanks,
Rammohan B.


#3

Hi thank you for replying!

I understand how to use read range and store it in a datatable. But how do I retrieve it according the the columns to store it in my third party system?
This is my excel sheet.
image
I used Read Cell but it read each cell and I can store it as a variable and store it in my third party system but it’s not efficient…


#4

You can use ReadRange activity and store it in a DataTable.

Use ‘For Each Row’ activity to iterate through all the rows within this DataTable.
row.item(0).ToString should give you the value for ‘first’ for each of the row.
row.item(1).ToString should give you the value for ‘last’ for each of the row and so on.

You can store those values into a string and then pass it to the application that you want to work with.

Thanks,
Rammohan B.