Custom Data Export from 1C-Bitrix to Excel

Custom Export to Excel from 1C-Bitrix for Managers Managers need data in Excel: orders for a period, client list, stock balances. Standard Bitrix export is limited and usually requires admin access. Custom export for managers directly from the site interface or admin reports is a separate develop

Our competencies:

Frequently Asked Questions

Latest works

  • B2B ADVANCE company website development
    B2B ADVANCE company website development
    1466
  • Website development for FIXPER company
    Website development for FIXPER company
    1019
  • Development based on Bitrix, Bitrix24, 1C for the company Development of an Online Appointment Booking Widget for a Medical Center
    Development based on Bitrix, Bitrix24, 1C for the company Development of an Online Appointment Booking Widget for a Medical Center
    764
  • Development based on 1C Enterprise for MIRSANBEL
    Development based on 1C Enterprise for MIRSANBEL
    882
  • Website development on CRM Bitrix24 for DOLBIMBY
    Website development on CRM Bitrix24 for DOLBIMBY
    811
  • Development based on Bitrix24 for the company TECHNOTORGKOMPLEKS
    Development based on Bitrix24 for the company TECHNOTORGKOMPLEKS
    1167

Custom Export to Excel from 1C-Bitrix for Managers

Managers need data in Excel: orders for a period, client list, stock balances. Standard Bitrix export is limited and usually requires admin access. Custom export for managers directly from the site interface or admin reports is a separate development we do turnkey. Our engineers with 5+ years of Bitrix experience and dozens of implemented exports guarantee stable operation even on catalogs of 50,000 items. A typical case: a manager needs to export 30,000 orders for a quarter with filters by status and manager — standard tools can't do this.

Why standard export doesn't suit managers?

Standard "Export" buttons in /bitrix/admin/ require administrator rights. Managers often don't have such access. The solution is to place export in the personal account or a separate page using Bitrix API and PhpSpreadsheet. Below is a proven architecture.

Standard Bitrix export capabilities: what's available out of the box?

Out of the box, Bitrix exports to Excel:

  • Order list in the admin section (/bitrix/admin/sale_order.php) — "Export" button
  • Infoblock elements (/bitrix/admin/iblock_element_admin.php) — export via list
  • CRM reports in Bitrix24

These tools provide basic CSV/XLS without formatting, only from the admin section. For managers without access to /bitrix/admin/ — not suitable. Compare: custom export offers formatted files with auto-fit column widths and styles — 10 times more convenient for reading.

Parameter Standard export Custom export
Access from admin Yes Not necessary
Formatting Basic Full (fonts, colors, width)
Filters Only default Any (date, status, manager, amount)
Data volume Up to 10,000 rows Up to 100,000 with caching
Access rights Only administrator Customizable groups

How to add an export button in the personal account?

The most common task is exporting orders with filters by date, status, manager. We use PhpSpreadsheet to generate XLSX. The code below is a base that we adapt to your CRM:

use PhpOffice\PhpSpreadsheet\Spreadsheet; use PhpOffice\PhpSpreadsheet\Writer\Xlsx; use Bitrix\Sale\OrderTable; use Bitrix\Main\Type\DateTime; class OrderExporter { public function export(array $filter): string { $orders = OrderTable::getList([ 'filter' => [ '>=DATE_INSERT' => new DateTime($filter['date_from']), '<=DATE_INSERT' => new DateTime($filter['date_to']), '=STATUS_ID' => $filter['status'] ?? null, '=LID' => SITE_ID, ], 'select' => [ 'ID', 'ACCOUNT_NUMBER', 'DATE_INSERT', 'PRICE', 'CURRENCY', 'STATUS_ID', 'USER_ID', ], 'order' => ['DATE_INSERT' => 'DESC'], ])->fetchAll(); $spreadsheet = new Spreadsheet(); $sheet = $spreadsheet->getActiveSheet(); // Заголовки $sheet->fromArray( ['№ заказа', 'Дата', 'Покупатель', 'Email', 'Телефон', 'Сумма', 'Валюта', 'Статус'], null, 'A1' ); $sheet->getStyle('A1:H1')->getFont()->setBold(true); $row = 2; foreach ($orders as $order) { $user = $this->getUserInfo($order['USER_ID']); $sheet->fromArray([ $order['ACCOUNT_NUMBER'], $order['DATE_INSERT']->format('d.m.Y H:i'), $user['FULL_NAME'], $user['EMAIL'], $user['PHONE'], $order['PRICE'], $order['CURRENCY'], $this->getStatusName($order['STATUS_ID']), ], null, 'A' . $row); $row++; } $writer = new Xlsx($spreadsheet); $file = tempnam(sys_get_temp_dir(), 'orders_'); $writer->save($file); return $file; } } 

Export product stock with SQL query

For stock export we use the b_catalog_store_product table plus infoblock. This query collects SKU, name, total quantity, and reserve:

$result = \Bitrix\Main\Application::getConnection()->query(" SELECT ie.id, ie.name, prop_article.value AS article, SUM(csp.amount) AS total_amount, SUM(csp.quantity_reserved) AS reserved FROM b_iblock_element ie JOIN b_iblock_element_property prop_article ON prop_article.iblock_element_id = ie.id AND prop_article.iblock_property_id = :article_prop_id LEFT JOIN b_catalog_store_product csp ON csp.product_id = ie.id WHERE ie.iblock_id = :iblock_id AND ie.active = 'Y' GROUP BY ie.id, ie.name, prop_article.value ORDER BY ie.name ", ['iblock_id' => CATALOG_IBLOCK_ID, 'article_prop_id' => ARTICLE_PROP_ID]); 

What to do with million-row datasets?

For catalogs over 100,000 records we add paginated AJAX export: data is fetched in chunks of 10,000 rows and combined on the server. Tagged caching invalidates only the specific export cache when data changes. This reduces database load by 70%. Additionally, we use PhpSpreadsheet's streaming writer to avoid holding the entire document in memory.

The cache is built based on the filter hash and last modification date. On repeated requests with the same parameters, the file is served from cache, bypassing generation. This is especially effective for standard reports that managers request daily.

Access control and AJAX route

The export is called via an AJAX handler with permission check:

// /local/ajax/export_orders.php \Bitrix\Main\Loader::includeModule('sale'); if (!$USER->IsAdmin() && !$USER->IsInGroup(MANAGER_GROUP_ID)) { header('HTTP/1.1 403 Forbidden'); exit; } $exporter = new OrderExporter(); $file = $exporter->export($_GET); header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'); header('Content-Disposition: attachment; filename="orders_' . date('Y-m-d') . '.xlsx"'); header('Content-Length: ' . filesize($file)); readfile($file); unlink($file); 

What is included in turnkey work

  1. Analytics — we study the data schema, user rights, export frequency.
  2. Design — choose data sources, plan filters and format.
  3. Development — write PHP component using PhpSpreadsheet, AJAX handler, configure caching.
  4. Testing — check on volumes up to 100,000 rows, adjust memory.
  5. Documentation — describe how to add new fields, change filters.
  6. Training — show managers where to download the report.

Timelines and cost

Configuration Timeline
Export of one data type (orders or products) 1–2 days
Export with filters and multiple sheets 2–4 days
Export module with UI filter in personal account 4–6 days

Cost is calculated individually depending on the complexity and scope of the project. This includes setup of one data source, basic filters, and permission check. If you need complex filters, multiple sheets, or caching, the final price is clarified after analysis.

Why order export from us?

We are certified 1C-Bitrix developers with 5+ years of experience and over 50 implementations. We use PhpSpreadsheet — a stable library with formatting support, recommended by the community. We guarantee the export won't fail on large volumes, and data will be exported without loss. Managers save up to 90% of time on report preparation. Order development — we'll evaluate your project for free within 1 business day. Get a consultation on integration right now.