How to save attachment email and read file excel

Now I save attachments and I want to read file excel.

Please guide me how to read file excel.

The saved file?
Then use Excel Application Scope
In that use read range

What fill path in Excel Application Scope?

if i don’t know file name.

You should save the attachment in a new folder and then read file from that folder using
Directory.GetFiles(FolderPath)(0) for first file

1 Like

I use activity assign but error.

image

What wrong?

That means that folder doesnt have that file
First Print it in message box to check is it coming or not

I try write range in excel.
data to coming.

What are u doing in that assign?

exceldatatable = read range in excel

image

Is output datatable having data if yes
Then check whether the variable of read range having scope global or not

1 Like

thank you

Welcome!

Happy Automation!

1 Like

Hi ImPratham45,

I want to read sheet excel but i don’t know name sheet.

Please guide me.

How many sheets are there in a file
and u know the name of the file?

1 sheet in file and I don’t know file name.

U can use get workbook sheets activity
or Use Application scope variable for workbook
Say Wb is variable then
Wb.Getsheets

I don’t understand about Say Wb is variable.

Now I user excel application scope as below.

image

Why I use read range, It error.

image

Its an list of sheets
If u have only one then use Wb.sheets(0)