What is the ODC file format?
.odc is a text-based file format developed by Microsoft for use with Excel and other Office applications. .odc files are used for accessing data from external resources such as databases, OLAP cubes, spreadsheets, or text files. Structurally, each .odc file is an HTML document with an embedded XML island - specifically an <odc:OfficeDataConnection> block - that stores the connection string, command type, and query details needed to reach the external source. Files can be opened in any web browser or text editor as well as in Excel itself.
An .odc file does not contain data; it stores the instructions for how Excel should connect to and refresh data from that source. Each file holds information about the data source including its location, type, authentication credentials, and any associated SQL or MDX queries. Because connection strings may embed server names and credentials, .odc files can expose sensitive infrastructure details if shared without care.
.odc support was introduced in Microsoft Office 2007, which also added built-in data connection management directly within Excel. Files can be created and exported from Excel, and Excel uses them to refresh connected tables and PivotTables from the specified source. In modern Microsoft 365 Excel, Power Query / Get & Transform connections increasingly complement standalone .odc files, though .odc remains fully supported.
Security & safety
RISK: MEDIUMThe .odc file is plain HTML/XML and not executable, but it carries real risks: (1) connection strings are stored in clear text and can expose server names and sometimes credentials - treat .odc files as sensitive; (2) opening an .odc in Excel can trigger an external data connection that pulls from a remote source, which has been used in data- exfiltration/phishing scenarios, so don't open .odc files from untrusted senders; Excel warns before enabling external connections - heed it.
Format details
in a nutshell- Lotus Notes / generic OpenDocument confusion - Some catalogs mislabel .odc as an OpenDocument file; that is incorrect - .odc is Microsoft's Office Data Connection, not an ODF format.
Programs that open ODC files
Technical details
deep spec| Developer | Microsoft |
| Primary MIME type | application/vnd.ms-office.odc |
| Alternative MIME types | text/x-ms-odc; text/html |
| File structure | HTML document wrapping an embedded XML island |
| Core XML element | <odc:OfficeDataConnection> within an inline <xml> block |
| File encoding | UTF-8 plain text |
| Encryption | None - connection strings and credentials stored in plain text |
| Typical file size | 1 KB - 10 KB |
| File identification | HTML meta tag with ProgId=ODC.Database or ODC.Table; no binary magic bytes |
| Supported connection targets | Relational databases (SQL Server, Access), OLAP/Analysis Services cubes, Excel workbooks, text files, web queries |
| Stored parameters | Connection string, command type (SQL / MDX / Table), command text, authentication settings, display metadata |
| Supported platforms | Windows; macOS (Excel for Mac) |
| Modern complement | Power Query / Get & Transform connections (Microsoft 365 Excel) increasingly replace .odc files, though .odc remains supported |
| Related Excel connection formats | .iqy (web query), .dqy (database query), .udl (universal data link), .rqy (OLAP query) |
| Released | Microsoft Office 2007 |
| Latest version | Tracks the Office version (Microsoft 365 Excel) |
| Specification | learn.microsoft.com |
ODC conversions
Community Q&A
asked by usersNo questions yet - be the first to ask about ODC files.