PHP Classes

Sheet name?

Recommend this page to a friend!

      SimpleXLSX  >  All threads  >  Sheet name?  >  (Un) Subscribe thread alerts  
Subject:Sheet name?
Summary:How can you extract the sheet name(s)?
Messages:6
Author:Pablo D Carrau
Date:2012-09-11 18:33:47
Update:2012-09-12 13:11:06
 

  1. Sheet name?   Reply   Report abuse  
Picture of Pablo D Carrau Pablo D Carrau - 2012-09-11 18:33:47
How can I get the current sheet name/title from the XLSX file?

Excellent job, by the way...extremely useful! If only it could read XLS files too, then it would be PERFECT!

  2. Re: Sheet name?   Reply   Report abuse  
Picture of Sergey Shuchkin Sergey Shuchkin - 2012-09-11 23:16:32 - In reply to message 1 from Pablo D Carrau
Download new version 0.5, please, and try

echo $xlsx->sheetName();

  3. Re: Sheet name?   Reply   Report abuse  
Picture of Sergey Shuchkin Sergey Shuchkin - 2012-09-11 23:17:10 - In reply to message 1 from Pablo D Carrau
$xlsx->sheetName(1)

  4. Re: Sheet name?   Reply   Report abuse  
Picture of Pablo D Carrau Pablo D Carrau - 2012-09-12 02:47:29 - In reply to message 3 from Sergey Shuchkin
Thanks Sergey for the quick update.

I'm having trouble with the new feature, however. It seems to work fine with your sample XLSX file but with the files I'm working with, it either displays nothing/blank for a file with one sheet and for a file with 3 sheets, it gets the names in the wrong order. I don't understand why that's happening.

Here are the files that are giving me trouble:
concept211.com/samples/xlsx/Sept%20 ...
concept211.com/samples/xlsx/Sept%20 ...

Any help is greatly appreciated!

  5. Re: Sheet name?   Reply   Report abuse  
Picture of Sergey Shuchkin Sergey Shuchkin - 2012-09-12 08:19:02 - In reply to message 4 from Pablo D Carrau
try 0.5.1

  6. Re: Sheet name?   Reply   Report abuse  
Picture of Pablo D Carrau Pablo D Carrau - 2012-09-12 13:11:06 - In reply to message 5 from Sergey Shuchkin
Perfect! Thank you very much!