Power Query Email to Excel: Import Email Data Into Excel

Last updated July 2026

Try it now: extract email data to Excel, CSV, or JSON

Convert your email files
No install

Connect a mailbox to pull .eml/.msg in bulk, or paste a raw email to test the converter now.

or paste an email to test
Output format
Columns to extract
Extract your own custom fields
Popular:

Create a free account to download. No credit card required.

Need the fields, not the whole body?

MailParse reads the headers, body, and HTML tables of a message and writes the values you name into their own columns. Try the email to Excel converter, or read the Power Query comparison below.

Yes, Power Query can import email into Excel, but only from Exchange, and it hands you the message body as a single blob of text. The Microsoft Exchange and Exchange Online connectors return one row per message with columns for sender, subject, date, and a Body column holding both the plain text and HTML versions of the whole message. Anything inside that body, an invoice total, a purchase order number, a table of line items, stays buried in the blob until you write M code to dig it out.

That distinction is the whole story. Power Query is excellent at reshaping data that is already structured. An email body is not structured, and that is where most people get stuck.

Last updated July 2026.

Can Power Query import email data into Excel?

It can, through Get Data, then From Other Sources, then From Microsoft Exchange or Exchange Online. You sign in to the mailbox and pick the Mail table, and Power Query returns your messages as rows. You need a qualifying license for the connector, and the mail has to live on Exchange or Microsoft 365. There is no IMAP connector and no Gmail connector.

What the Exchange connector actually returns

Once you load the Mail table, you get a workable set of message-level columns. This is genuinely useful when the data you need is in the header fields.

ColumnWhat is in itUseful straight away?
Sender / FromThe sending address, as a record you expandYes
SubjectThe subject line as textYes, and often the easiest place to parse an order or ticket number from
DateTimeReceivedTimestamp of the messageYes
BodyBoth a plain text and an HTML version of the entire messageNo, this is one long string per email
AttachmentsA list of attachments on the messageFilenames only, the file contents are not parsed

Where Power Query stops

Four limits catch people out, and they are worth knowing before you build a query you will have to maintain.

The body is one column. To get an invoice total out of it you write M code, usually Text.BetweenDelimiters or a chain of splits keyed to the exact wording of the email. It works until the sender changes their template, then it silently returns nulls or the wrong value.

The license gate. The Exchange connector needs an enterprise license such as E3 or E5, or a standalone Office Professional install. Excel bundled with a consumer Microsoft 365 Home subscription does not expose it, which is a common surprise on a small business machine.

Exchange only. If your company runs mail on Fastmail, Zoho Mail, Rackspace, a cPanel host, or your own server, Power Query has no connector for it at all. That is a hard stop, and it is why an IMAP email parser exists as a separate route.

Refresh is awkward. The connector does not support scheduled refresh against on-premises sources, so a report you wanted to update itself often ends up as a query somebody clicks Refresh on each morning.

How do I extract a table from an email body to Excel?

This is the single most common Power Query email question, and it is the one the Exchange connector answers worst. Because the body arrives as text, an HTML table inside the message is not a table to Power Query, it is a run of markup in a string. You either write M code to parse the HTML or you copy the table out by hand.

A parser treats the HTML table as what it is. MailParse reads each row of the table in the message and writes it as its own spreadsheet row, so a shipping notice with eight line items becomes eight rows, not one cell containing eight lines. The step-by-step walkthrough is in the guide on how to extract a table from an email.

Power Query versus an email parser, compared honestly

What mattersPower Query (Exchange connector)Email parser
Message headers to columnsYes, and it does this wellYes
Named values from the bodyOnly if you write and maintain M codeYes, you name the field once
HTML table in the body to rowsNot without custom parsingYes, each table row becomes a row
Non-Microsoft mailboxesNo connectorGmail, Microsoft 365, or any IMAP host
CostIncluded if you already hold a qualifying licenseA paid tool, though the mapping replaces the code
Best forAnalysts already living in Excel who need header-level data from ExchangeTeams who need specific values out of the message body, repeatedly

Credit where it is due: if your mail is on Microsoft 365, you hold the right license, and you only need sender, subject, and date, Power Query is free, native, and perfectly good. Reach for a parser when the value you actually want is inside the message.

Does Power Query work with Gmail?

Not directly. Power Query ships no Gmail connector, so the common workarounds are exporting mail and loading the files, using a third-party connector, or pushing the data into a Google Sheet and connecting to that instead. If Gmail is your mail host, parsing straight from the mailbox with a Gmail email parser skips the export step entirely.

Can Power Query read email attachments?

It lists them. The Attachments column gives you the attachment names on each message, not the contents of the files. Reading what is inside an attached PDF or a scanned image is a document extraction job, not an email parsing one. MailParse works the same way here: it reads the email itself and records each attachment by filename, type, and size. When the numbers you need are locked inside a PDF statement rather than the email body, converting that statement into a spreadsheet is the step that actually gets you the figures.

How do I import an email into Excel without Power Query?

Three routes, depending on how often you need it. For a one-off, save the message as a .eml or .msg file and convert it, which the EML to Excel converter handles. For a recurring pull from Outlook, the guide on exporting Outlook emails to Excel covers the built-in options. For an ongoing feed where you need the same fields every time, connect the mailbox to a parser and let it write the sheet.

A workflow that survives a template change

The reason parsing keeps beating M code in the long run is maintenance. A query built on Text.BetweenDelimiters is keyed to the exact words around the value, so it breaks quietly when a vendor redesigns their notification email, and you find out when a total reads as null three weeks later. Naming the field you want and letting the parser find it in the body is more resilient, and when it does need adjusting, you edit a mapping instead of debugging M in the formula bar.

Set it up once: connect the mailbox, name the columns you want (including the ones buried in the body), and export to Excel. New mail flows into the same shape. If you would rather keep working in Excel afterwards, point Power Query at the exported file, which is the part Power Query is genuinely great at. To see the field mapping in action, start with the email to Excel parser.