Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
prashantmoger
Frequent Visitor

Unable to extract mails saved in local folder

Hi , Iam new to poewr bi. I have multiple .msg files saved in a local drive folder. Each .msg file has a table in it's body that I need to consolidate into an  in Excel.

 

But iam not able to extract contents of the mail. Please let me know what M functions can be used to extract the Text body.

 

 

1 ACCEPTED SOLUTION
AlexisOlson
Super User
Super User

I don't think there is a straightforward way to do this. There's an idea related to this but it doesn't have many votes.

https://ideas.powerbi.com/ideas/idea/?ideaid=031df74f-f03e-454a-a6c8-c08b99503bd9

 

Theoretically, since an .msg file is basically a .zip file with various contents including the text of the body, you could decompress it and pick out the appropriate text. I tried but failed with this approach.

 

See @ibarrau's and @lbendlin's blog posts as well as @artemus's comments:
https://community.powerbi.com/t5/Community-Blog/PowerQuery-Decompress-zip-Files/ba-p/1326035

https://community.powerbi.com/t5/Community-Blog/Working-With-Zip-Files-in-Power-Query/ba-p/1190186

https://community.powerbi.com/t5/Power-Query/How-to-connect-Azure-DevOps-REST-API-in-to-power-bi/m-p...

 

For the time being, you'll likely need to convert .msg files to a friendlier format before importing them into Power BI.

View solution in original post

3 REPLIES 3
AlexisOlson
Super User
Super User

I don't think there is a straightforward way to do this. There's an idea related to this but it doesn't have many votes.

https://ideas.powerbi.com/ideas/idea/?ideaid=031df74f-f03e-454a-a6c8-c08b99503bd9

 

Theoretically, since an .msg file is basically a .zip file with various contents including the text of the body, you could decompress it and pick out the appropriate text. I tried but failed with this approach.

 

See @ibarrau's and @lbendlin's blog posts as well as @artemus's comments:
https://community.powerbi.com/t5/Community-Blog/PowerQuery-Decompress-zip-Files/ba-p/1326035

https://community.powerbi.com/t5/Community-Blog/Working-With-Zip-Files-in-Power-Query/ba-p/1190186

https://community.powerbi.com/t5/Power-Query/How-to-connect-Azure-DevOps-REST-API-in-to-power-bi/m-p...

 

For the time being, you'll likely need to convert .msg files to a friendlier format before importing them into Power BI.

Thanks for the reply

Yeah, good luck with that.  

lbendlin_0-1638559247289.png

How would you know that the higlighted file contains the raw message body?

lbendlin_1-1638559291927.png

and this is only for plain text messages. Pretty sure RTF and HTML formats are packed differently.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors