-
-
Save ildarkhasanshin/a2d6fdf39ff8ef1832adb055a8a2335f to your computer and use it in GitHub Desktop.
Битрикс: Экспорт в Excel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ($bExcel) | |
{ | |
$APPLICATION->RestartBuffer(); | |
// hack. any '.default' customized template should contain 'excel' page | |
$this->__templateName = '.default'; | |
Header("Content-Type: application/force-download"); | |
Header("Content-Type: application/octet-stream"); | |
Header("Content-Type: application/download"); | |
Header("Content-Disposition: attachment;filename=tasks.xls"); | |
Header("Content-Transfer-Encoding: binary"); | |
$this->IncludeComponentTemplate('excel'); | |
die(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment