protected function buildWorkbookRelsXML()
{
$i = 0;
$wkbkrels_xml = "";
$wkbkrels_xml .= '<?xml version="1.0" encoding="UTF-8"?>' . "\n";
$wkbkrels_xml .= '<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">';
$wkbkrels_xml .= '<Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" Target="styles.xml"/>';
foreach ($this->sheets as $sheet_name => $sheet) {
$wkbkrels_xml .= '<Relationship Id="rId' . ($i + 2) . '" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="worksheets/' . $sheet->xmlname . '"/>';
$i++;
}
if (!empty($this->shared_strings)) {
$wkbkrels_xml .= '<Relationship Id="rId' . (count($this->sheets) + 2) . '" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings" Target="sharedStrings.xml"/>';
}
$wkbkrels_xml .= "\n";
$wkbkrels_xml .= '</Relationships>';
return $wkbkrels_xml;
}