NYCPHP Meetup

NYPHP.org

[nycphp-talk] de-moronizing an Excel sheet

Alvaro P. apg88zx at gmail.com
Mon Mar 5 14:56:48 EST 2007


Just be careful if you're exporting CSV's in a mac and using fgetcsv(). 
You will need to set "auto_detect_line_endings = On" on the php.ini or 
the line breaks will be ignored.

Alvaro

Susan Shemin wrote:
> I see there are fancy classes to handle this...
>  
> But why not use the old-fashioned way and export your Excel data in a 
> CSV format and import it into MySQL?  I do it all the time with 
> locally inserting Office data into a MySQL database and creating 
> backups for my database.
>
> ----- Original Message ----
> From: David Mintz <vtbludgeon at gmail.com>
> To: talk at lists.nyphp.org
> Sent: Monday, March 5, 2007 2:04:22 PM
> Subject: [nycphp-talk] de-moronizing an Excel sheet
>
> Hey everyone,
>
> Is anyone familiar with this Spreadsheet_Excel_Reader class? 
> http://sourceforge.net/project/showfiles.php?group_id=99160
>
> I need to import Excel to MySQL. This class seems promising -- I have 
> started playing and can get the data into PHP, no problem. Except that 
> the single quotes, double quotes, em dashes, et cetera are wreaking 
> havoc. Does anyone know of any solution? I see there are 
> setOutputEncoding() and setUTFEncoder() methods but I am not sure 
> whether they are what I need and what values to pass them.
>
> Thanks.
>
> -- 
> David Mintz
> http://davidmintz.org/
>
> En Nueva York el tránsito de la belleza a la desolación sucede siempre 
> expeditivamente, como si el principio universal de máxima eficiencia 
> hubiera aconsejado la supresión de gradaciones intermedias.
>
>   -- Antonio Muñoz Molina, Ventanas de Manhattan
> _______________________________________________
> New York PHP Community Talk Mailing List
> http://lists.nyphp.org/mailman/listinfo/talk
>
> NYPHPCon 2006 Presentations Online
> http://www.nyphpcon.com <http://www.nyphpcon.com/>
>
> Show Your Participation in New York PHP
> http://www.nyphp.org/show_participation.php
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> New York PHP Community Talk Mailing List
> http://lists.nyphp.org/mailman/listinfo/talk
>
> NYPHPCon 2006 Presentations Online
> http://www.nyphpcon.com
>
> Show Your Participation in New York PHP
> http://www.nyphp.org/show_participation.php




More information about the talk mailing list