How to get attachment name only xlsx file

Dear all, seek help on how to get the filename of the email that only has an xlsx attachment. However certain email that has the images as the firdt attachment will read image.jpg as the first or default attachment. Which is not what i wanted. I need to only get the xlsx file name attachment

Hey @Teck_Hwee_Goh

Instead of using the Assign - Use the “Save Attachments” Activity and update the “Filter” to be “*.xls”.

This will filter out the image and only get the excel attachment you are looking for.

Then use a “for each” on the attachments output variable (from “save attachments”) and write out the filename.

Hopefully this helps.

Cheers

Steve

1 Like


Thanks i managed tonresolve using path.getfilename using for each loop through save attachment filter by xlsx

Hi,

FYI, the following filter pattern might be better. (This pattern is IgnoreCase)

"(?i:\.xlsx?$)"

Regards,

Thank u for the tip!

Directory.Getfiles(Fol_Path).Where(Function(F) F.Endswith(“.xlsx”)).Toarray