Definition at line 36 of file DocProps.php.
◆ writeDocPropsApp()
PHPExcel_Writer_Excel2007_DocProps::writeDocPropsApp |
( |
PHPExcel |
$pPHPExcel = null | ) |
|
Write docProps/app.xml to XML format.
- Parameters
-
- Returns
- string XML Output
- Exceptions
-
Definition at line 45 of file DocProps.php.
References $i, $objWriter, PHPExcel_Writer_Excel2007_WriterPart\getParentWriter(), PHPExcel_Shared_XMLWriter\STORAGE_DISK, and PHPExcel_Shared_XMLWriter\STORAGE_MEMORY.
56 $objWriter->startDocument(
'1.0',
'UTF-8',
'yes');
60 $objWriter->writeAttribute(
'xmlns',
'http://schemas.openxmlformats.org/officeDocument/2006/extended-properties');
61 $objWriter->writeAttribute(
'xmlns:vt',
'http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes');
64 $objWriter->writeElement(
'Application',
'Microsoft Excel');
70 $objWriter->writeElement(
'ScaleCrop',
'false');
78 $objWriter->writeAttribute(
'baseType',
'variant');
82 $objWriter->writeElement(
'vt:lpstr',
'Worksheets');
100 $objWriter->writeAttribute(
'baseType',
'lpstr');
103 for (
$i = 0;
$i < $sheetCount; ++
$i) {
118 $objWriter->writeElement(
'LinksUpToDate',
'false');
121 $objWriter->writeElement(
'SharedDoc',
'false');
124 $objWriter->writeElement(
'HyperlinksChanged',
'false');
127 $objWriter->writeElement(
'AppVersion',
'12.0000');
getSheetCount()
Get sheet count.
getProperties()
Get properties.
getParentWriter()
Get parent IWriter object.
getSheet($pIndex=0)
Get sheet by index.
const STORAGE_MEMORY
Temporary storage method.
◆ writeDocPropsCore()
PHPExcel_Writer_Excel2007_DocProps::writeDocPropsCore |
( |
PHPExcel |
$pPHPExcel = null | ) |
|
Write docProps/core.xml to XML format.
- Parameters
-
- Returns
- string XML Output
- Exceptions
-
Definition at line 142 of file DocProps.php.
References $objWriter, date, PHPExcel_Writer_Excel2007_WriterPart\getParentWriter(), PHPExcel_Shared_XMLWriter\STORAGE_DISK, and PHPExcel_Shared_XMLWriter\STORAGE_MEMORY.
153 $objWriter->startDocument(
'1.0',
'UTF-8',
'yes');
156 $objWriter->startElement(
'cp:coreProperties');
157 $objWriter->writeAttribute(
'xmlns:cp',
'http://schemas.openxmlformats.org/package/2006/metadata/core-properties');
158 $objWriter->writeAttribute(
'xmlns:dc',
'http://purl.org/dc/elements/1.1/');
159 $objWriter->writeAttribute(
'xmlns:dcterms',
'http://purl.org/dc/terms/');
160 $objWriter->writeAttribute(
'xmlns:dcmitype',
'http://purl.org/dc/dcmitype/');
161 $objWriter->writeAttribute(
'xmlns:xsi',
'http://www.w3.org/2001/XMLSchema-instance');
171 $objWriter->writeAttribute(
'xsi:type',
'dcterms:W3CDTF');
177 $objWriter->writeAttribute(
'xsi:type',
'dcterms:W3CDTF');
getProperties()
Get properties.
getParentWriter()
Get parent IWriter object.
date( 'd-M-Y', $objPHPExcel->getProperties() ->getCreated())
const STORAGE_MEMORY
Temporary storage method.
◆ writeDocPropsCustom()
PHPExcel_Writer_Excel2007_DocProps::writeDocPropsCustom |
( |
PHPExcel |
$pPHPExcel = null | ) |
|
Write docProps/custom.xml to XML format.
- Parameters
-
- Returns
- string XML Output
- Exceptions
-
Definition at line 209 of file DocProps.php.
References $key, $objWriter, date, PHPExcel_Writer_Excel2007_WriterPart\getParentWriter(), PHPExcel_Shared_XMLWriter\STORAGE_DISK, and PHPExcel_Shared_XMLWriter\STORAGE_MEMORY.
211 $customPropertyList = $pPHPExcel->
getProperties()->getCustomProperties();
212 if (empty($customPropertyList)) {
225 $objWriter->startDocument(
'1.0',
'UTF-8',
'yes');
229 $objWriter->writeAttribute(
'xmlns',
'http://schemas.openxmlformats.org/officeDocument/2006/custom-properties');
230 $objWriter->writeAttribute(
'xmlns:vt',
'http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes');
233 foreach($customPropertyList as
$key => $customProperty) {
234 $propertyValue = $pPHPExcel->
getProperties()->getCustomPropertyValue($customProperty);
235 $propertyType = $pPHPExcel->
getProperties()->getCustomPropertyType($customProperty);
238 $objWriter->writeAttribute(
'fmtid',
'{D5CDD505-2E9C-101B-9397-08002B2CF9AE}');
240 $objWriter->writeAttribute(
'name', $customProperty);
242 switch($propertyType) {
244 $objWriter->writeElement(
'vt:i4', $propertyValue);
247 $objWriter->writeElement(
'vt:r8', $propertyValue);
250 $objWriter->writeElement(
'vt:bool', ($propertyValue) ?
'true' :
'false');
258 $objWriter->writeElement(
'vt:lpwstr', $propertyValue);
getProperties()
Get properties.
getParentWriter()
Get parent IWriter object.
date( 'd-M-Y', $objPHPExcel->getProperties() ->getCreated())
const STORAGE_MEMORY
Temporary storage method.
The documentation for this class was generated from the following file:
- libs/composer/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel2007/DocProps.php