PHP Classes

Invalid cell index after Tiny But Strong XLSX class

Recommend this page to a friend!

      SimpleXLSX  >  All threads  >  Invalid cell index after Tiny But...  >  (Un) Subscribe thread alerts  
Subject:Invalid cell index after Tiny But...
Summary:.xlsx doc changed by tiny but strong classes throws error??
Messages:8
Author:Sander Korst
Date:2013-05-05 17:39:50
Update:2013-06-14 20:09:19
 

  1. Invalid cell index after Tiny But...   Reply   Report abuse  
Picture of Sander Korst Sander Korst - 2013-05-05 17:39:50
Dear reader,

I hope that someone can help me with this problem. Its driving me nuts!

I have a script in which I use the Tiny But Strong Open TBS XLSX plugin to change an Excel document and save it. Before changing this document, I read it with Simple XLSX to a database (works GREAT!).

But the problem occurs when I use the same file twice. So when I open a file, process it and save it everything goes right. But when I open that same file again and process it again, Simple XSLX says "Invalid Cell Index" and dies.

How can I solve this? What is wrong with the document?

I really hope someone can help me. Thanks a lot in advance!!

Sander

  2. Re: Invalid cell index after Tiny But...   Reply   Report abuse  
Picture of Sander Korst Sander Korst - 2013-05-05 21:10:40 - In reply to message 1 from Sander Korst
One more thing:

I found out that all files that are being threaded with Open TBS (Tiny But Strong) are unreadable afterwards. Why? And how to fix this? (I already checked some of the xml files from the working and not-working versions, but couldnt find any differences...)

As an example, I uploaded an example excel document here (one that doesnt work): https://www.wetransfer.com/downloads/4f9458552df0d2d0f69162d86f81ad7f20130505210644/c6ee5aaed78d7f61f81b76e6e4a2764f20130505210644/943edc

My entire script (two months of work) is based on the combination of both XLSX and Open TBS, so I really hope to find a solution...

  3. Re: Invalid cell index after Tiny But...   Reply   Report abuse  
Picture of Sergey Shuchkin Sergey Shuchkin - 2013-05-06 03:50:26 - In reply to message 2 from Sander Korst
Sander, I see open tbs allow generate just XML, but not XLSX

  4. Re: Invalid cell index after Tiny But...   Reply   Report abuse  
Picture of Sander Korst Sander Korst - 2013-05-06 08:31:42 - In reply to message 3 from Sergey Shuchkin
Hi Sergey,

Thanks for your fast response!

Sure it doesn't? Because I can edit an XLSX file with it (or in this case even an xlsm with macro's in it), change it, save it and then it opens perfectly in excel (including the macros). I thought it only changes the xml's, but it repacked them back as it found it (and when I unzip both original xlsx and the changed xlsx I cannot find any differences manually...).

When it does not, do you know where I can find the difference? Any chance to get this working together?

  5. Re: Invalid cell index after Tiny But...   Reply   Report abuse  
Picture of Sergey Shuchkin Sergey Shuchkin - 2013-05-06 09:04:04 - In reply to message 4 from Sander Korst
try
$xlsx = new SimpleXLSX( $your_filename );
echo $xlsx->error();

  6. Re: Invalid cell index after Tiny But...   Reply   Report abuse  
Picture of Sander Korst Sander Korst - 2013-05-06 10:22:23 - In reply to message 5 from Sergey Shuchkin
echo $xlsx->error(); doesn't give any extra information. But the complete error is the following:

Fatal error: Uncaught exception 'Exception' with message 'Invalid cell index.' in simplexlsx.class.php:279 Stack trace: #0 simplexlsx.class.php(201): SimpleXLSX->_columnIndex('') #1 script.php(20): SimpleXLSX->rows(4) #2 script.php(356): require_once('/path/...') #3 {main} thrown in simplexlsx.class.php on line 279

Any idea?

  7. Re: Invalid cell index after Tiny But...   Reply   Report abuse  
Picture of Sander Korst Sander Korst - 2013-06-14 20:09:19 - In reply to message 5 from Sergey Shuchkin
Hi Sergey,

Did you by chance found the cause for this problem?

It is very strange, because when I open the document in simple xlsx it works, but after OpenTBS it gives the invalid cell index error. My script is almost complete, and this is the ONLY problem left. It drives me crazy :s

Do you think it would help if I send you the excel example for study?

Thanks for your time...

S

  8. Re: Invalid cell index after Tiny But...   Reply   Report abuse  
Picture of ariel ariel - 2016-06-11 22:36:12 - In reply to message 7 from Sander Korst
Hello;

I know the topic is very old more this tip will remedy this problem, always select all cells and apply formatting "text", thus this error will not appear;