56                $objWriter->startDocument(
'1.0',
'UTF-8',
'yes');
 
   60                $objWriter->writeAttribute(
'xmlns', 
'http://schemas.openxmlformats.org/package/2006/relationships');
 
   62                        $customPropertyList = $pPHPExcel->getProperties()->getCustomProperties();
 
   63                        if (!empty($customPropertyList)) {
 
   68                                        'http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties',
 
   78                                'http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties',
 
   86                                'http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties',
 
   94                                'http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument',
 
   98                        if($pPHPExcel->hasRibbon()){
 
   99                                $this->_writeRelationShip(
 
  102                                        'http://schemas.microsoft.com/office/2006/relationships/ui/extensibility',
 
  103                                        $pPHPExcel->getRibbonXMLData(
'target')
 
  131                $objWriter->startDocument(
'1.0',
'UTF-8',
'yes');
 
  135                $objWriter->writeAttribute(
'xmlns', 
'http://schemas.openxmlformats.org/package/2006/relationships');
 
  141                                'http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles',
 
  149                                'http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme',
 
  157                                'http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings',
 
  162                        $sheetCount = $pPHPExcel->getSheetCount();
 
  163                        for (
$i = 0; 
$i < $sheetCount; ++
$i) {
 
  167                                        'http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet',
 
  168                                        'worksheets/sheet' . (
$i + 1) . 
'.xml' 
  173                        if($pPHPExcel->hasMacros()){
 
  174                                $this->_writeRelationShip(
 
  177                                        'http://schemas.microsoft.com/office/2006/relationships/vbaProject',
 
  213                $objWriter->startDocument(
'1.0',
'UTF-8',
'yes');
 
  217                $objWriter->writeAttribute(
'xmlns', 
'http://schemas.openxmlformats.org/package/2006/relationships');
 
  221                        if ($includeCharts) {
 
  222                                $charts = $pWorksheet->getChartCollection();
 
  226                        if (($pWorksheet->getDrawingCollection()->count() > 0) ||
 
  227                                (count($charts) > 0)) {
 
  231                                        'http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing',
 
  232                                        '../drawings/drawing' . $pWorksheetId . 
'.xml' 
  253                        foreach ($pWorksheet->getHyperlinkCollection() as $hyperlink) {
 
  254                                if (!$hyperlink->isInternal()) {
 
  258                                                'http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink',
 
  259                                                $hyperlink->getUrl(),
 
  269                        if (count($pWorksheet->getComments()) > 0) {
 
  272                                        '_comments_vml' . 
$i,
 
  273                                        'http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing',
 
  274                                        '../drawings/vmlDrawing' . $pWorksheetId . 
'.vml' 
  280                                        'http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments',
 
  281                                        '../comments' . $pWorksheetId . 
'.xml' 
  287                        if (count($pWorksheet->getHeaderFooter()->getImages()) > 0) {
 
  290                                        '_headerfooter_vml' . 
$i,
 
  291                                        'http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing',
 
  292                                        '../drawings/vmlDrawingHF' . $pWorksheetId . 
'.vml' 
  322                $objWriter->startDocument(
'1.0',
'UTF-8',
'yes');
 
  326                $objWriter->writeAttribute(
'xmlns', 
'http://schemas.openxmlformats.org/package/2006/relationships');
 
  330                        $iterator = $pWorksheet->getDrawingCollection()->getIterator();
 
  331                        while ($iterator->valid()) {
 
  338                                                'http://schemas.openxmlformats.org/officeDocument/2006/relationships/image',
 
  339                                                '../media/' . str_replace(
' ', 
'', $iterator->current()->getIndexedFilename())
 
  347                        if ($includeCharts) {
 
  349                                $chartCount = $pWorksheet->getChartCount();
 
  350                                if ($chartCount > 0) {
 
  351                                        for ($c = 0; $c < $chartCount; ++$c) {
 
  355                                                        'http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart',
 
  356                                                        '../charts/chart' . ++$chartRef . 
'.xml' 
  386                $objWriter->startDocument(
'1.0',
'UTF-8',
'yes');
 
  390                $objWriter->writeAttribute(
'xmlns', 
'http://schemas.openxmlformats.org/package/2006/relationships');
 
  393                        foreach ($pWorksheet->getHeaderFooter()->getImages() as 
$key => $value) {
 
  398                                        'http://schemas.openxmlformats.org/officeDocument/2006/relationships/image',
 
  399                                        '../media/' . $value->getIndexedFilename()
 
  421                if ($pType != 
'' && $pTarget != 
'') {
 
  424                        $objWriter->writeAttribute(
'Id',                
'rId' . $pId);
 
  426                        $objWriter->writeAttribute(
'Target',    $pTarget);
 
  428                        if ($pTargetMode != 
'') {
 
  429                                $objWriter->writeAttribute(
'TargetMode',        $pTargetMode);
 
An exception for terminatinating execution or to throw for unit testing.
const STORAGE_MEMORY
Temporary storage method.
writeWorksheetRelationships(PHPExcel_Worksheet $pWorksheet=null, $pWorksheetId=1, $includeCharts=FALSE)
Write worksheet relationships to XML format.
writeHeaderFooterDrawingRelationships(PHPExcel_Worksheet $pWorksheet=null)
Write header/footer drawing relationships to XML format.
writeWorkbookRelationships(PHPExcel $pPHPExcel=null)
Write workbook relationships to XML format.
writeRelationships(PHPExcel $pPHPExcel=null)
Write relationships to XML format.
_writeRelationship(PHPExcel_Shared_XMLWriter $objWriter=null, $pId=1, $pType='', $pTarget='', $pTargetMode='')
Write Override content type.
writeDrawingRelationships(PHPExcel_Worksheet $pWorksheet=null, &$chartRef, $includeCharts=FALSE)
Write drawing relationships to XML format.
getParentWriter()
Get parent IWriter object.
for( $i=6;$i< 13;$i++) for($i=1; $i< 13; $i++) $d