Saving 2 page sheet in XLSX creates 12 page sheet

Topics: Developer Forum, User Forum
Jan 16, 2013 at 4:07 PM


I'm using PHPExcel to load a xlsx spreadsheet I created in Office 2013. It's a 3 sheet workbook, of which the first worksheet is intended for printing. This worksheet is 2 pages. My problem is the following: if I open the file in PHPExcel and then save it, it creates a worksheet not of 2, but of 12 pages of which 10 are empty. Since the two pages are positioned next to eachother in the sheet, and not above eachother, the second page displays on page 5 in the print preview. This also happens if I write nothing to the file, just open and save it.

If I keep everything in old xls format, all goes fine, except I can't do that as I need to have it in xlsx.

If I open it as xlsx and save it as xls, I get a 9 page file.

What could be the problem?



Jan 16, 2013 at 4:47 PM

Spoke too soon, somehow had to do with my xlsx file. I recreated the xlsx from scratch and all is fine now.