Download the PHP package wpdev/odata-feed without Composer

On this page you can find all versions of the php package wpdev/odata-feed. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package odata-feed

OData Feed — Live Connection XLSX Writer

PHP package that takes a PhpSpreadsheet workbook (or file path) and produces an .xlsx with an embedded Power Query connection to a remote OData v4 feed. When opened in Excel and refreshed, Excel re-fetches live data from the configured OData URL.

This package is Package 2 in the excel-kit stack. It pairs with the OData endpoint package (wpdev/phpspreadsheet-odata) which serves the live data.

Requirements

Installation

Quick start

Load an existing workbook:

Examples

Example 1 — minimal writer demo (static OData URL):

Example 2 — full live refresh playground (OData server + Excel workbook):

Edit $feeds in playground.php, save, then refresh the workbook in Excel. The playground enables HTTP Basic auth ($username / $password) so Excel prompts for credentials on refresh — nothing is stored in the .xlsx. Re-run --build only when sheet names, feedId, or the OData base URL change. For subdirectory hosting, pass --base-url or set PLAYGROUND_BASE_URL when building.

Feed configuration

FeedConfig holds three values:

Property Description
baseUrl OData service root, e.g. https://api.example.com/odata
feedId Tenant/feed identifier used as a path segment
entitySet Sheet/entity name, e.g. Sales

The final OData URL is built as:

Example: https://api.example.com/odata/abc123/Sales

The visible worksheet in the output file is named to match entitySet.

Security

No authentication token or password is stored inside the generated .xlsx. Excel prompts the user for credentials on refresh and stores them in the OS credential manager. The file contains only the OData URL and Power Query definition.

Optional feed metadata persistence

Inject FeedRepositoryInterface to persist feed metadata when writing:

Pass null (default) to skip persistence.

How it works

Hand-synthesizing the Power Query (MS-QDEFF) parts proved too fragile for Excel (it kept triggering the "We found a problem with some content" repair prompt, especially on Excel for Mac). Instead the writer reuses a real, Excel-authored Power Query workbook as a template:

  1. resources/live-template.xlsx is a known-good workbook that Excel itself generated from an OData feed (working connections.xml, xl/tables, xl/queryTables, and the customXml/item1.xml DataMashup).
  2. LiveXlsxWriter clones that template and rewrites only the OData feed URL inside the DataMashup's Formulas/Section1.m (rebuilding the inner OPC package and recomputing the MS-QDEFF section lengths). Changing the package invalidates the DPAPI permission bindings, so they are replaced with the spec's single null-byte fallback and Excel applies default permissions on open.

Every other part stays byte-for-byte as Excel wrote it, so the output opens cleanly and refreshes live.

entitySet is normalized to match Package 1 entity-set identifiers (e.g. Sales DataSales_Data). feedId must match [A-Za-z0-9_-]+. Credentials are never stored in the file.

To regenerate resources/live-template.xlsx, create a new OData Power Query connection in Excel (Data → Get Data → From OData Feed), load it to a table, save the .xlsx, and drop it in as the template.

Compatibility

Client Support
Excel for Windows Supported
Excel for Mac Supported (Power Query available)
Apple Numbers NOT supported (no Power Query / OData live refresh)

Development

License

GNU General Public License v2.0 or later — see LICENSE.


All versions of odata-feed with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
phpoffice/phpspreadsheet Version ^1.29
wpdev/phpspreadsheet-odata Version ^1.0
ext-zip Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package wpdev/odata-feed contains the following files

Loading the files please wait ...