mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
#485 Export for MS Excel web queries: format=spreadsheet
SVN:trunk[1711]
This commit is contained in:
@@ -126,6 +126,19 @@ if (!empty($sExpression))
|
||||
cmdbAbstractObject::DisplaySetAsCSV($oP, $oSet, array('fields' => $sFields));
|
||||
break;
|
||||
|
||||
case 'spreadsheet':
|
||||
$oP = new WebPage("iTop - Export for spreadsheet");
|
||||
|
||||
// Integration within MS-Excel web queries + HTTPS + IIS:
|
||||
// MS-IIS set these header values with no-cache... while Excel fails to do the job if using HTTPS
|
||||
// Then the fix is to force the reset of header values Pragma and Cache-control
|
||||
header("Pragma:", true);
|
||||
header("Cache-control:", true);
|
||||
|
||||
$sFields = implode(',', $aFields);
|
||||
cmdbAbstractObject::DisplaySetAsHTMLSpreadsheet($oP, $oSet, array('fields' => $sFields));
|
||||
break;
|
||||
|
||||
case 'xml':
|
||||
$oP = new XMLPage("iTop - Export", true /* passthrough */);
|
||||
cmdbAbstractObject::DisplaySetAsXML($oP, $oSet);
|
||||
|
||||
Reference in New Issue
Block a user