Flexible product export to CSV, Excel, XML, JSON

Custom product export: CSV, Excel, XML, JSON for any requirement

Development and maintenance of all types of websites:

Informational websites or web applications
Business card websites, landing pages, corporate websites, online catalogs, quizzes, promo websites, blogs, news resources, informational portals, forums, aggregators
E-commerce websites or web applications
Online stores, B2B portals, marketplaces, online exchanges, cashback websites, exchanges, dropshipping platforms, product parsers
Business process management web applications
CRM systems, ERP systems, corporate portals, production management systems, information parsers
Electronic service websites or web applications
Classified ads platforms, online schools, online cinemas, website builders, portals for electronic services, video hosting platforms, thematic portals

These are just some of the technical types of websites we work with, and each of them can have its own specific features and functionality, as well as be customized to meet the specific needs and goals of the client.

Our competencies:

Frequently Asked Questions

Latest works

  • image_web-applications_feedme_466_0.webp
    Development of a web application for FEEDME
    1283
  • image_ecommerce_furnoro_435_0.webp
    Development of an online store for the company FURNORO
    1238
  • image_crm_enviok_479_0.webp
    Development of a web application for Enviok
    982
  • image_crm_chasseurs_493_0.webp
    CRM development for Chasseurs
    1029
  • image_website-sbh_0.webp
    Website development for SBH Partners
    1104
  • image_website-_0.webp
    Website development for Red Pear
    552

Custom product export: CSV, Excel, XML, JSON for any requirement

Recently, a client came to us: an online store with 50,000 products. Marketplaces demanded XML and CSV in different formats, accounting needed Excel for 1C, and analysts wanted JSON. Each time developers wrote a new script, spending days. Field mapping errors caused the price without VAT to be sent to Wildberries. This is a typical situation for a growing business when departments request different formats and there's no unified solution.

We proposed a single architecture — the Builder + Writer pattern. It covers all scenarios without code duplication. Now the client selects an export template from the admin panel, clicks "Download", and gets the needed file format in seconds.

Why flexible export is complex?

  • Different formats: CSV doesn't support nested data, XML is standard for 1C and marketplaces, JSON is convenient for APIs, but for sizes >50 MB NDJSON is better.
  • Each recipient wants their own set of fields: for Yandex.Market you need SKU, name, price, stock; for Instagram only photo and link.
  • Data volume: a catalog can grow to hundreds of thousands of items. A simple json_encode into memory will crash the server.

How does async export work?

For large catalogs, export runs in the background via a queue. A job receives the template configuration, iterates through products in chunks of 1000 records, and passes them to the Writer. The user gets a notification when the file is ready. This avoids blocking the site and allows exporting even millions of products.

How we build export: Builder + Writer pattern

We separated data formation logic (Builder) and file writing (Writer). The Builder receives a chain of methods for configuring fields and filters, then iterates through the database in chunks and passes rows to the Writer.

interface ExportWriterInterface { public function open(string $filePath): void; public function writeHeader(array $columns): void; public function writeRow(array $row): void; public function close(): string; // returns file path } 

The Builder stores the config and can resolve related fields (category, images, attributes) via a match expression. For CSV: we add BOM for Excel, use fputcsv with ; delimiter.

class CsvWriter implements ExportWriterInterface { private $handle; public function open(string $filePath): void { $this->handle = fopen($filePath, 'w'); fwrite($this->handle, "\xEF\xBB\xBF"); } public function writeHeader(array $columns): void { fputcsv($this->handle, $columns, ';', '"'); } public function writeRow(array $row): void { fputcsv($this->handle, $row, ';', '"'); } public function close(): string { fclose($this->handle); return $this->filePath; } } 

For Excel we use streaming OpenSpout — it writes rows directly into a ZIP stream, consuming ~10 MB memory regardless of file size. For large JSON volumes — NDJSON (one object per line). XML — via XMLWriter with <product> elements.

Format comparison table

Format Performance File size Nesting Recommended volume
CSV high small no up to 100,000 rows
XLSX medium medium no up to 1,000,000 rows (with OpenSpout)
XML low large yes up to 50,000 products
JSON/NDJSON high medium yes up to 500,000 objects (NDJSON)

Comparison of manual vs automated export

Parameter Manual (new script each time) Automated (Builder + Writer)
Development time for new format 1-2 days 0 (select template)
Mapping errors frequent eliminated (single config)
Performance at large volume slow, memory crash streaming, ~10 MB
Adapting to new requirements complete rewrite add field to Builder
Builder configuration example
$builder = new ProductExportBuilder(); $builder->addField('sku', function ($product) { return $product->sku; }) ->addField('name', function ($product) { return $product->name; }) ->addField('price', function ($product) { return round($product->price, 2); }) ->addField('category', function ($product) { return $product->category->name; }) ->filterBy('price', '>', 100) ->chunkSize(1000); 

What is included in the implementation

  • Development of a Builder with support for custom fields, filters, and chunking (1000 records).
  • Writer set for CSV (with BOM), XLSX (OpenSpout), XML, JSON (including NDJSON).
  • Async export for large files: products are exported in the background via a queue, user gets notification.
  • Export templates — stored in DB, can include transformations (price rounding, image cropping).
  • Ready download page with access control and MIME types.
  • Documentation for template setup and deployment.

How long does it take?

  • Basic version (CSV + Excel + Builder with chunking) — 2 days.
  • Adding XML, JSON, NDJSON and async job — +1 day.
  • Templates, transformations, download — +1 day.

The final cost is calculated individually after analyzing the volume and complexity of the catalog. Contact us — we will assess your project within one business day.

Our engineers have 5+ years of experience in Laravel and PHP. We have completed 30+ export integration projects for stores with catalogs up to 500,000 products. We guarantee that the files will be compatible with 1C, your marketplaces, and BI systems. Order a turnkey solution — get flexible export that saves your developers hours.