Richard Lynch wrote:
On Fri, July 27, 2007 4:01 am, Angelo Zanetti wrote:
Does anyone have any resources or links as to how to import a
spreadsheet but it might have different number of columns and many
sheets (those tab things at the bottom).

What I thought of doing was creating a table that has 10 fields and if
the file thats being imported only has 4 fields then the remaining six
fields are blank.

So basically my script must dynamically take the format (which
changes)
and try save it in the database in a semi standard format.

If anyone thinks its possible or not please advise. Any help or advice
would be greatly appreciated.

I didn't actually import multiple sheets, but the tool I used returned
an array "sheets" and the 0-th element was the only sheet in there, so
I suspect a second sheet would have been the next element...

It's a PECL package up on sourceforge:
http://sourceforge.net/projects/phpexcelreader/

As far as columns and rows goes, it just built an array the right size
to hold everything in the spreadsheet.

Though if you've got a stray "space" in column ZZZ row 65535, then I
suppose you could be in trouble...

It's got a bug as of a couple weeks ago where it tries to 'include' a
file that doesn't exist...

Change that to include the similarly-named file that's actually there
and bob's your uncle.

YMMV

PS
Watch out for those serial killer dates... :-)
I blogged a little bit about this here:
http://richardlynch.blogspot.com/2007/07/php-microsoft-excel-reader-and-serial.html

hi guys.

Thanks to those that responded, I will check out all the responses!

Much appreciated!

regards
Angelo

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to