Skip to content
This repository has been archived by the owner on Jan 2, 2019. It is now read-only.

Excel2007 Writer: Cells have no width/height #321

Closed
sarciszewski opened this issue Feb 19, 2014 · 4 comments
Closed

Excel2007 Writer: Cells have no width/height #321

sarciszewski opened this issue Feb 19, 2014 · 4 comments

Comments

@sarciszewski
Copy link
Contributor

I'm working on a piece that (among other things), pulls $xls->getSheet($i)->toArray() and stores it into a multidimensional array, performs operations on it, then uses $xls->getSheet($i)->fromArray($this->data[$i], ...) to load everything back into PHPExcel for output.

(Sort of a wrapper/helper class and abstraction layer with a bunch of small nice-to-have features, like curl integration.)

However, the problem I'm experiencing is that the resultant .xlsx file has zero-width rows and columns for the data that was reinserted into PHPExcel from the fromArray() method.

Input:
http://www.tempsend.com/7E8F154264
Output:
http://www.tempsend.com/6AD13163BF

(I'd like to be sure that this isn't a bug in PHPExcel before I tear everything apart again looking for a bug.)

@sarciszewski
Copy link
Contributor Author

I wonder if it's similar to #158 ?

UPDATE: Yes. I created another test file at http://www.tempsend.com/9C6FB2AA87 using Microsoft Excel 2013 and it worked fine, but with LibreOffice it fails: http://tempsend.com/D85D19B574

@sarciszewski
Copy link
Contributor Author

Further testing:

# This is the LibreOffice version: 
sarciszewski@sarciszewski-VirtualBox ~/code $ unzip -o -d test4 test4.xlsx
Archive:  test4.xlsx
  inflating: test4/_rels/.rels       
  inflating: test4/docProps/app.xml  
  inflating: test4/docProps/core.xml  
  inflating: test4/xl/_rels/workbook.xml.rels  
  inflating: test4/xl/sharedStrings.xml  
  inflating: test4/xl/worksheets/sheet1.xml  
  inflating: test4/xl/styles.xml     
  inflating: test4/xl/workbook.xml   
  inflating: test4/[Content_Types].xml  
# This is the Excel 2013 version:
sarciszewski@sarciszewski-VirtualBox ~/code $ unzip -o -d test3 test3.xlsx
Archive:  test3.xlsx
  inflating: test3/[Content_Types].xml  
  inflating: test3/_rels/.rels       
  inflating: test3/xl/_rels/workbook.xml.rels  
  inflating: test3/xl/workbook.xml   
  inflating: test3/xl/sharedStrings.xml  
  inflating: test3/xl/worksheets/_rels/sheet1.xml.rels  
  inflating: test3/xl/theme/theme1.xml  
  inflating: test3/xl/styles.xml     
  inflating: test3/xl/worksheets/sheet1.xml  
  inflating: test3/docProps/core.xml  
  inflating: test3/xl/calcChain.xml  
  inflating: test3/xl/printerSettings/printerSettings1.bin  
  inflating: test3/docProps/app.xml  

So right away, there's an inconsistency that PHPExcel is probably not accounting for. Let's take a closer look: http://pastebin.com/F3R1s6B0

@MarkBaker
Copy link
Member

Now resolved on develop branch

@sarciszewski
Copy link
Contributor Author

Excellent. Thank you 👍 😄

@Progi1984 Progi1984 added this to the 1.8.0 milestone Aug 14, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants