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.
46 {
47
51 } else {
53 }
54
55
56 $objWriter->startDocument(
'1.0',
'UTF-8',
'yes');
57
58
60 $objWriter->writeAttribute(
'xmlns',
'http://schemas.openxmlformats.org/officeDocument/2006/extended-properties');
61 $objWriter->writeAttribute(
'xmlns:vt',
'http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes');
62
63
64 $objWriter->writeElement(
'Application',
'Microsoft Excel');
65
66
68
69
70 $objWriter->writeElement(
'ScaleCrop',
'false');
71
72
74
75
78 $objWriter->writeAttribute(
'baseType',
'variant');
79
80
82 $objWriter->writeElement(
'vt:lpstr',
'Worksheets');
84
85
89
91
93
94
96
97
100 $objWriter->writeAttribute(
'baseType',
'lpstr');
101
103 for (
$i = 0;
$i < $sheetCount; ++
$i) {
105 }
106
108
110
111
113
114
116
117
118 $objWriter->writeElement(
'LinksUpToDate',
'false');
119
120
121 $objWriter->writeElement(
'SharedDoc',
'false');
122
123
124 $objWriter->writeElement(
'HyperlinksChanged',
'false');
125
126
127 $objWriter->writeElement(
'AppVersion',
'12.0000');
128
130
131
133 }
const STORAGE_MEMORY
Temporary storage method.
getParentWriter()
Get parent IWriter object.
getSheetCount()
Get sheet count.
getProperties()
Get properties.
getSheet($pIndex=0)
Get sheet by index.
References $i, $objWriter, PHPExcel_Writer_Excel2007_WriterPart\getParentWriter(), PHPExcel_Shared_XMLWriter\STORAGE_DISK, and PHPExcel_Shared_XMLWriter\STORAGE_MEMORY.
◆ 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.
143 {
144
148 } else {
150 }
151
152
153 $objWriter->startDocument(
'1.0',
'UTF-8',
'yes');
154
155
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');
162
163
165
166
168
169
171 $objWriter->writeAttribute(
'xsi:type',
'dcterms:W3CDTF');
174
175
177 $objWriter->writeAttribute(
'xsi:type',
'dcterms:W3CDTF');
180
181
183
184
186
187
189
190
192
193
195
197
198
200 }
date( 'd-M-Y', $objPHPExcel->getProperties() ->getCreated())
References $objWriter, date, PHPExcel_Writer_Excel2007_WriterPart\getParentWriter(), PHPExcel_Shared_XMLWriter\STORAGE_DISK, and PHPExcel_Shared_XMLWriter\STORAGE_MEMORY.
◆ 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.
210 {
211 $customPropertyList = $pPHPExcel->
getProperties()->getCustomProperties();
212 if (empty($customPropertyList)) {
213 return;
214 }
215
216
220 } else {
222 }
223
224
225 $objWriter->startDocument(
'1.0',
'UTF-8',
'yes');
226
227
229 $objWriter->writeAttribute(
'xmlns',
'http://schemas.openxmlformats.org/officeDocument/2006/custom-properties');
230 $objWriter->writeAttribute(
'xmlns:vt',
'http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes');
231
232
233 foreach($customPropertyList as
$key => $customProperty) {
234 $propertyValue = $pPHPExcel->
getProperties()->getCustomPropertyValue($customProperty);
235 $propertyType = $pPHPExcel->
getProperties()->getCustomPropertyType($customProperty);
236
238 $objWriter->writeAttribute(
'fmtid',
'{D5CDD505-2E9C-101B-9397-08002B2CF9AE}');
240 $objWriter->writeAttribute(
'name', $customProperty);
241
242 switch($propertyType) {
243 case 'i' :
244 $objWriter->writeElement(
'vt:i4', $propertyValue);
245 break;
246 case 'f' :
247 $objWriter->writeElement(
'vt:r8', $propertyValue);
248 break;
249 case 'b' :
250 $objWriter->writeElement(
'vt:bool', ($propertyValue) ?
'true' :
'false');
251 break;
252 case 'd' :
256 break;
257 default :
258 $objWriter->writeElement(
'vt:lpwstr', $propertyValue);
259 break;
260 }
261
263 }
264
265
267
268
270 }
References $key, $objWriter, date, PHPExcel_Writer_Excel2007_WriterPart\getParentWriter(), PHPExcel_Shared_XMLWriter\STORAGE_DISK, and PHPExcel_Shared_XMLWriter\STORAGE_MEMORY.
The documentation for this class was generated from the following file:
- libs/composer/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel2007/DocProps.php