Excel to CSV
am 11.03.2006 00:14:37 von Nur_Adman
------_=_NextPart_001_01C64498.67364AD5
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Dear All,
=20
Have you any script/example how to Save As Excel file to CSV using PHP?
=20
Thanks & Regards,
Anita
------_=_NextPart_001_01C64498.67364AD5--
Re: Excel to CSV
am 11.03.2006 14:53:23 von Trevor Gryffyn
The other response is half correct.. I havn't seen anything to read data from Excel with PHP (although it's technically possible, just kind of complicated) so the easiest solution is to use Excel and just have it load the file and save it in CSV format.
The part that's not entirely correct is the "PHP can't talk to Excel" part. It's cumbersome, but PHP can use a COM connection to control Excel (or Word or MapPoint or Access or Outlook..etc). This means you'd have to have Excel loaded on the server that was running PHP, which may not be an option.
For an example of PHP + COM with Excel, check out:
http://www.php.net/manual/en/class.com.php
Look down the page for the entry posted by "flintjt at hotmail dot com"
If COM doesn't work for you and you don't mind getting your hands dirty, I believe you can get the Excel file format spec.. maybe through the OpenOffice sources.. and figure out how to read XLS files that way.
The Excel Object Model might help you with the proper properties/methods/etc:
http://msdn.microsoft.com/library/default.asp?url=/library/e n-us/dv_wrcore/html/wrgrfexcelworkbookobject.asp
Good luck.
-TG
= = = Original message = = =
Dear All,
Have you any script/example how to Save As Excel file to CSV using PHP?
Thanks & Regards,
Anita
___________________________________________________________
Sent by ePrompter, the premier email notification software.
Free download at http://www.ePrompter.com.
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: Excel to CSV
am 11.03.2006 18:33:18 von Micah Stevens
I've never used it, but:
http://sourceforge.net/projects/phpexcelreader/
-Micah
On Saturday 11 March 2006 5:53 am, tg-php@gryffyndevelopment.com wrote:
> The other response is half correct.. I havn't seen anything to read data
> from Excel with PHP (although it's technically possible, just kind of
> complicated) so the easiest solution is to use Excel and just have it load
> the file and save it in CSV format.
>
> The part that's not entirely correct is the "PHP can't talk to Excel" part.
> It's cumbersome, but PHP can use a COM connection to control Excel (or
> Word or MapPoint or Access or Outlook..etc). This means you'd have to have
> Excel loaded on the server that was running PHP, which may not be an
> option.
>
> For an example of PHP + COM with Excel, check out:
>
> http://www.php.net/manual/en/class.com.php
>
> Look down the page for the entry posted by "flintjt at hotmail dot com"
>
> If COM doesn't work for you and you don't mind getting your hands dirty, I
> believe you can get the Excel file format spec.. maybe through the
> OpenOffice sources.. and figure out how to read XLS files that way.
>
> The Excel Object Model might help you with the proper
> properties/methods/etc:
> http://msdn.microsoft.com/library/default.asp?url=/library/e n-us/dv_wrcore/
>html/wrgrfexcelworkbookobject.asp
>
> Good luck.
>
> -TG
>
> = = = Original message = = =
>
> Dear All,
>
> Have you any script/example how to Save As Excel file to CSV using PHP?
>
> Thanks & Regards,
>
> Anita
>
> ___________________________________________________________
> Sent by ePrompter, the premier email notification software.
> Free download at http://www.ePrompter.com.
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
RE: Excel to CSV
am 12.03.2006 22:56:31 von Nur_Adman
------_=_NextPart_001_01C6461F.D300CE2D
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Thank you so much for all your responses.
=20
Yeah, finally I decided to use excel reader. It solved my problem.
=20
=20
-----Original Message-----
From: Micah Stevens [mailto:micah@raincross-tech.com]=20
Sent: Sunday, March 12, 2006 2:33 AM
To: php-db@lists.php.net
Subject: Re: [PHP-DB] Excel to CSV
=20
=20
I've never used it, but:=20
=20
http://sourceforge.net/projects/phpexcelreader/
=20
-Micah=20
=20
=20
On Saturday 11 March 2006 5:53 am, tg-php@gryffyndevelopment.com wrote:
> The other response is half correct.. I havn't seen anything to read
data
> from Excel with PHP (although it's technically possible, just kind of
> complicated) so the easiest solution is to use Excel and just have it
load
> the file and save it in CSV format.
>=20
> The part that's not entirely correct is the "PHP can't talk to Excel"
part.
> It's cumbersome, but PHP can use a COM connection to control Excel
(or
> Word or MapPoint or Access or Outlook..etc). This means you'd have to
have
> Excel loaded on the server that was running PHP, which may not be an
> option.
>=20
> For an example of PHP + COM with Excel, check out:
>=20
> http://www.php.net/manual/en/class.com.php
>=20
> Look down the page for the entry posted by "flintjt at hotmail dot
com"
>=20
> If COM doesn't work for you and you don't mind getting your hands
dirty, I
> believe you can get the Excel file format spec.. maybe through the
> OpenOffice sources.. and figure out how to read XLS files that way.
>=20
> The Excel Object Model might help you with the proper
> properties/methods/etc:
>
http://msdn.microsoft.com/library/default.asp?url=3D/library /en-us/dv_wrc=
o
re/
>html/wrgrfexcelworkbookobject.asp
>=20
> Good luck.
>=20
> -TG
>=20
> =3D =3D =3D Original message =3D =3D =3D
>=20
> Dear All,
>=20
> Have you any script/example how to Save As Excel file to CSV using
PHP?
>=20
> Thanks & Regards,
>=20
> Anita
>=20
> ___________________________________________________________
> Sent by ePrompter, the premier email notification software.
> Free download at http://www.ePrompter.com.
=20
--=20
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
=20
------_=_NextPart_001_01C6461F.D300CE2D--