EDI 850 to Excel: Convert EDI Purchase Order Files to Excel, CSV, and Line Item Rows

An EDI 850 is the X12 purchase order your retail and distribution partners send, and it arrives as one unbroken run of segments rather than a spreadsheet. This page explains what each segment holds, how to flatten a hierarchical 850 into flat Excel or CSV rows, and how to get the PDF and emailed orders from your smaller accounts into those same columns.

PDF, JPG, PNG, BMP, HEIC, TIFF

Submit your purchase orders

X12 004010 and 005010
Header and line items
Excel and CSV output
PDF orders too

Why an EDI 850 Will Not Just Open in Excel

The 850 is a machine to machine format. It was designed to be parsed by software, not read by a person, and nothing about it lines up with rows and columns.

The File Is One Long String, Not Rows

Many 850s arrive with no line breaks at all. Segments end with a terminator character and elements are split by a separator, both declared in the ISA header. Open it in Excel and you get a single very wide row, or one enormous cell.

The Data Is Hierarchical and a Sheet Is Flat

One order has a BEG header, one or more N1 party loops, then a repeating PO1 loop with one entry per item. Turning that into rows means repeating the header on every line, which no delimiter setting in Excel will do for you.

Every Element Is a Code

BEG02 says SA. N101 says ST. PO106 says UP. None of it reads as English, so a spreadsheet full of raw qualifiers is barely more useful than the file it came from. The codes have to be translated as part of the conversion.

Each Trading Partner Uses a Different Subset

X12 is a large standard and every retailer publishes its own implementation guide picking the segments and qualifiers it sends. A parser tuned to one partner tends to break on the next one, which is why this is rarely a one time job.

What PurchaseOrders Does, and What It Does Not Do

PurchaseOrders is a document extraction tool. It reads purchase orders that arrive as PDFs, scans or email attachments and returns the header plus every line item as clean columns. It is not an EDI translator: it does not connect to a VAN, and it does not generate a 997 acknowledgment. If your large partners send true X12 850 files, keep the translator that handles them. This page exists because most suppliers run both channels, and the second one is where the manual keying happens.

The Same Columns Your 850 Feed Produces

PO number, order date, requested ship date, ship to, vendor, then one row per item with quantity, unit of measure, unit price and part number. Line those up with what your translator writes and both channels land in one sheet.

Reads Any Supplier Layout

No template to build per vendor and no coordinate mapping. A new customer can send a completely different looking order and the same fields still come back, which is the practical difference from a per partner EDI map.

Keeps Both Part Numbers

An 850 carries buyer part and vendor part as qualifier and value pairs from PO106 onward. Orders on paper carry the same two numbers in different columns, and both survive the extraction so the item match still works.

Excel, CSV, JSON or API

Take a spreadsheet for review, delimited output to build an import file, or JSON over the API to feed the same downstream job your EDI drop already writes to.

Line Counts You Can Check

Every extracted order reports its line count, so you can run the same sanity check against a document that CTT01 gives you inside an 850.

Multi Page and Batch

Long orders that run over several pages stay as one order, and a folder of mixed customers can be processed in a single pass.

What each EDI 850 segment holds

An 850 is built from segments. Each segment starts with a two or three character identifier, its elements are separated by a delimiter (commonly an asterisk), and the segment ends with a terminator (commonly a tilde). The delimiters are declared in the ISA header, so read them from the file rather than assuming.

SegmentWhat it carriesSpreadsheet column it becomes
ISA / GS / STInterchange, functional group and transaction set envelope. ST01 is 850.Usually dropped, but keep ISA13 for traceability
BEGBEG01 purpose (00 original, 01 cancellation, 05 replace), BEG02 order type (SA stand alone, BK blanket, DS drop ship), BEG03 the PO number, BEG05 the PO date as CCYYMMDD.PO number, order date, order type
REFReference numbers qualified by a code, for example a department or contract number.One column per qualifier you care about
DTMDates by qualifier: 002 delivery requested, 010 requested ship, 001 cancel after, 037 and 038 ship not before and not after.Requested ship date, cancel date
N1 loopParties, keyed by N101: ST ship to, BT bill to, SF ship from, BY buying party, VN vendor. N3 and N4 carry street, city, state and ZIP.Ship to name and address, bill to, vendor
PO1One per ordered item. PO101 line number, PO102 quantity, PO103 unit of measure (EA each, CA case, LB pound), PO104 unit price, then repeating qualifier and value pairs from PO106 onward: UP for UPC, VN or VP for vendor part, BP for buyer part, SK for SKU.One spreadsheet row per line item
PIDFree form product description tied to the PO1 above it.Item description
CTTCTT01 is the count of PO1 segments and CTT02 an optional hash total of quantities.Not a column. Use it to check your parse

CTT01 is the single most useful validation you get for free. If your spreadsheet has a different number of item rows than CTT01 says, the parse dropped or duplicated a line and everything downstream is wrong.

Flattening a hierarchical order into flat rows

The awkward part is not splitting the file. It is that an 850 describes one order with many items, while a spreadsheet wants one fact per row. The usual answer is to denormalize: repeat the PO number, order date, requested ship date and ship to on every item row, so each row stands on its own and the sheet can be sorted, filtered and imported. A second common layout keeps two sheets, one header row per order and one line sheet joined on the PO number, which is closer to what most ERP import routines expect anyway. Decide which one before you parse, because rebuilding the loop afterwards is the expensive step.

Where the non-EDI orders fit

Most suppliers do not run one order channel, they run two. The large accounts send true 850s through a VAN or an AS2 connection. Everyone else emails a PDF, and that second stream is the one that gets keyed by hand. Pointing both at the same column layout is what makes the order book complete. If you want the reverse direction, where a PDF order has to be turned into data your EDI flow can send, see the PDF purchase order to EDI page. For a plain spreadsheet, the PO PDF to Excel converter and the CSV export produce it directly, and a backlog clears in one pass with bulk purchase order upload. Because the whole point is line level accuracy, purchase order line item extraction is the part that has to be right. Distributors working high order volume tend to start at purchase order extraction for wholesale distribution.

Background reading on the format

If you are newer to X12, what an EDI 850 purchase order is and how to read one walks the segments in order. EDI vs PDF purchase orders covers when each channel is worth the setup, cXML vs EDI compares the two formats large buyers use, and the EDI 856 advance ship notice is the document you send back once the order ships.

Every Route for Turning an EDI 850 into a Spreadsheet

Which one is right depends on whether this is a one time read or a channel you have to run every day.

Route Best for What it takes Watch out for
EDI translator export Ongoing 850 volume Your existing translator writing a CSV or a database drop Licensing plus a mapping step per trading partner, which is the usual reason people go looking for something lighter
Online EDI viewer A single file you need to read today Pasting or uploading the file into a web tool You are sending a live customer order, with prices and addresses, to a third party site
Parse it yourself A few predictable partners Split on the terminator, split on the element separator, then walk the PO1 loop and look up the qualifiers The loop handling and the code lookups are the fiddly part, not the splitting
Excel text to columns Almost nothing Data then Text to Columns using the element separator Produces one wide row per segment rather than a table, and cannot rebuild the item loop at all
Extract from the document Orders that arrive as PDF or email Uploading the order and exporting the columns Covers the non EDI channel only, which is exactly the gap it is meant to fill

From a Purchase Order Document to Spreadsheet Rows in 3 Steps

This is the path for the orders that do not arrive as X12, which for most suppliers is the majority of their customer list.

1

Upload the Purchase Order

Drop in the PDF, the scan or the email attachment. Multi page orders and a batch of mixed customers are both fine.

Tip: Start with two or three orders from your highest volume customer.

2

Check the Header and Lines On Screen

PO number, dates, ship to and every item line come back together, so you can confirm the line count and spot a misread quantity or price before anything moves downstream.

Tip: Compare the item count to the order the same way CTT01 checks an 850.

3

Export to Excel, CSV, JSON or the API

Take the columns in whatever shape the next system wants, matching the layout your EDI drop already writes so both channels merge cleanly.

Tip: Agree the column layout once, then both order channels can share it.

Why Suppliers Run Both Order Channels Into One Sheet

PDF
Any source document
CSV
Import-ready output
Any
Customer layout

Security & Privacy

  • Bank-grade TLS encryption in transit
  • Files auto-deleted after processing
  • Your PO data is never sold or shared
  • US-based cloud infrastructure

EDI 850 to Excel: Common Questions

Split the file on its segment terminator, split each segment on its element separator, then walk the PO1 loop and write one row per item while repeating the BEG and N1 header values on every row. Translate the qualifier codes as you go, and check your row count against CTT01. An EDI translator does this for you if you have one.

Not usefully. Excel can split an 850 on the element separator with Text to Columns, but the result is one very wide row per segment rather than a table. Excel has no way to rebuild the repeating PO1 item loop or to repeat the header values down the rows, which is the part that makes the data usable.

BEG carries the purpose code, order type, PO number and date. REF carries qualified reference numbers, DTM carries the dates, and the N1 loop carries ship to, bill to and vendor. PO1 repeats once per item with quantity, unit of measure, price and part numbers, PID gives the description, and CTT totals the lines.

The purchase order number is in BEG03, the third element of the BEG segment. BEG01 before it is the transaction purpose code and BEG02 is the order type, so in a segment reading BEG*00*SA*4500123456**20260715 the PO number is 4500123456 and the order date is 15 July 2026.

CTT01 holds the number of PO1 segments in the transaction, which makes it a free correctness check. After converting an 850 to a spreadsheet, count your item rows and compare. If the two numbers differ, the parse dropped or duplicated a line and the sheet cannot be trusted downstream.

The 850 is the purchase order the buyer sends. The 855 is the purchase order acknowledgment the supplier sends back to confirm, change or reject the order line by line. The 856 advance ship notice follows when the goods ship, and the 810 invoice comes after that.

No. PurchaseOrders reads purchase orders that arrive as PDFs, scans or email attachments and returns the header and line items as columns. True X12 850 files still need an EDI translator. The two are complementary: most suppliers receive 850s from large accounts and documents from everyone else.

X12 defines a large superset of optional segments and qualifiers, and each buyer publishes an implementation guide choosing which ones it sends. That is why one partner includes REF and PID segments another omits, and why a parser built against one guide usually needs work before it handles the next.

Yes, and it is the practical reason to standardize the columns. Decide on a header and line layout once, have your EDI translator write to it, and extract the PDF and emailed orders into the same shape. The order book is then complete regardless of which channel a customer uses.