Hello. I create file with xlsxwriter and then read it with https://github.com/nuovo/spreadsheet-reader. I have encountered a problem that when i start reading file (it has 2 sheets) the default is the second. But it worked well when i changed $i+2 to $i+1 at the line below
$workbook_xml.='<sheet name="'.self::xmlspecialchars($sheet->sheetname).'" sheetId="'.($i+1).'" state="visible" r:id="rId'.($i+2).'"/>';
xlsxwriter.class.php -> buildWorkBookXML();
What's purpose of using r:id="rId'.($i+2)? Is it correct? I couldnt find any information about that in OpenXML docs. And I cant override that implementation because of using self:: when calling
UPD: here is working code at the last version (i did it like to Excel app saves)
rId+2 is trying to make the Relationship Ids and files line up properly, it sounds like it works correctly most of the time, just not in your situation... glad you figured it out and made a fix for your situation.
Hello. I create file with xlsxwriter and then read it with https://github.com/nuovo/spreadsheet-reader. I have encountered a problem that when i start reading file (it has 2 sheets) the default is the second. But it worked well when i changed $i+2 to $i+1 at the line below
$workbook_xml.='<sheet name="'.self::xmlspecialchars($sheet->sheetname).'" sheetId="'.($i+1).'" state="visible" r:id="rId'.($i+2).'"/>';
xlsxwriter.class.php -> buildWorkBookXML(); What's purpose of using
r:id="rId'.($i+2)
? Is it correct? I couldnt find any information about that in OpenXML docs. And I cant override that implementation because of using self:: when callingUPD: here is working code at the last version (i did it like to Excel app saves)