RE: [PHP] PHP+MySQL - Excel ?

2002-05-18 Thread savaidis

I use the ODBC connection with no problem, I get about 1000 rows to Excel in
seconds.
First row contains the colums names.
But I wonder if there is a way to write back the data to MySQL database from
Excel.
(with ODBC connection, becouse with files I think is possible)


Makis


 -Original Message-
 From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]]
 Sent: Friday, May 17, 2002 7:54 PM
 To: Chris Boget
 Cc: [EMAIL PROTECTED]
 Subject: Re: [PHP] PHP+MySQL - Excel ?


 No, this has nothing to do with PHP.  You can run MySQL on Windows or
 UNIX, doesn't matter, and set up a connection directly from Excel to
 MySQL.

 PHP can of course run anywhere you want and manipulate the data in MySQL
 which will then be reflected in Excel.

 -Rasmus

 On Fri, 17 May 2002, Chris Boget wrote:

   It is also possible to connect directly to MySQL from Excel
 via MyODBC.
 
  True, but only if you are running PHP on a windows platform, yes?
 
  Chris
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 


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



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




Re: [PHP] PHP+MySQL - Excel ?

2002-05-17 Thread Jason Wong

On Saturday 18 May 2002 00:18, Evan wrote:
 Is it possible to create an excel file with some data from mySQL, using PHP
 ?

Yes if you know the file format for excel. If not then write your data into a 
CSV file.

-- 
Jason Wong - Gremlins Associates - www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *

/*
I can't decide which WRONG TURN to make first!!  I wonder if BOB
GUCCIONE has these problems!
*/


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




Re: [PHP] PHP+MySQL - Excel ?

2002-05-17 Thread Justin French

I guess you'd have to look around for exact specs on how Excel marks up
it's source (if you want formatting, bold, etc), but it's quite easy to
create a CSV (comma separated value) file which can easily be imported into
Excel, if you're happy to have no formatting.

I'm sure a quick dig around inside an xls file would help too.

Justin French


on 18/05/02 2:18 AM, Evan ([EMAIL PROTECTED]) wrote:

 Is it possible to create an excel file with some data from mySQL, using PHP
 ?
 
 Thanks,
 Evan
 
 


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




RE: [PHP] PHP+MySQL - Excel ?

2002-05-17 Thread Richard Black

You can use COM, if you're running on a Windows server. Haven't tried it
myself, right enough...
==
Richard Black
Systems Programmer, DataVisibility Ltd - http://www.datavisibility.com
Tel: 0141 435 3504
Email: [EMAIL PROTECTED]

-Original Message-
From: Justin French [mailto:[EMAIL PROTECTED]]
Sent: 17 May 2002 17:32
To: Evan; [EMAIL PROTECTED]
Subject: Re: [PHP] PHP+MySQL - Excel ?


I guess you'd have to look around for exact specs on how Excel marks up
it's source (if you want formatting, bold, etc), but it's quite easy to
create a CSV (comma separated value) file which can easily be imported into
Excel, if you're happy to have no formatting.

I'm sure a quick dig around inside an xls file would help too.

Justin French


on 18/05/02 2:18 AM, Evan ([EMAIL PROTECTED]) wrote:

 Is it possible to create an excel file with some data from mySQL, using
PHP
 ?

 Thanks,
 Evan




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


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




Re: [PHP] PHP+MySQL - Excel ?

2002-05-17 Thread Chris Boget

  Is it possible to create an excel file with some data from mySQL, using PHP
  ?
 Yes if you know the file format for excel. If not then write your data into a 
 CSV file.

I just output the data as regular HTML (tabled, usually) but send the following
headers first:

  header(Content-Disposition: inline; filename=myfile.xls);
  header(Content-Description: PHP3 Generated Data);
  header(Content-type: application/vnd.ms-excel; name='excel');

The browser will take that to mean that an excel document is coming through
and will open it up as such.  Since excel understands HTML, your data will be
displayed correctly.  Usually.
It's been working fine for us for years.

Chris


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




RE: [PHP] PHP+MySQL - Excel ?

2002-05-17 Thread Jay Blanchard

[snip]
Is it possible to create an excel file with some data from mySQL, using PHP
?
[/snip]

Evan,

I'll send you the article I recently wrote for evolt.org, it details all of
the things you need to know. Excel will honor all HTML table formatting
issues, except color. Colors need to be stated as RGB values. I have
intended to produce a chart of these that are valid in Excel, but time
runneth away

HTH!

Jay



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




Re: [PHP] PHP+MySQL - Excel ?

2002-05-17 Thread Rasmus Lerdorf

It is also possible to connect directly to MySQL from Excel via MyODBC.

-Rasmus

On Fri, 17 May 2002, Chris Boget wrote:

   Is it possible to create an excel file with some data from mySQL, using PHP
   ?
  Yes if you know the file format for excel. If not then write your data into a
  CSV file.

 I just output the data as regular HTML (tabled, usually) but send the following
 headers first:

   header(Content-Disposition: inline; filename=myfile.xls);
   header(Content-Description: PHP3 Generated Data);
   header(Content-type: application/vnd.ms-excel; name='excel');

 The browser will take that to mean that an excel document is coming through
 and will open it up as such.  Since excel understands HTML, your data will be
 displayed correctly.  Usually.
 It's been working fine for us for years.

 Chris


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



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




Re: [PHP] PHP+MySQL - Excel ?

2002-05-17 Thread Chris Boget

 It is also possible to connect directly to MySQL from Excel via MyODBC.

True, but only if you are running PHP on a windows platform, yes?

Chris


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




Re: [PHP] PHP+MySQL - Excel ?

2002-05-17 Thread Rasmus Lerdorf

No, this has nothing to do with PHP.  You can run MySQL on Windows or
UNIX, doesn't matter, and set up a connection directly from Excel to
MySQL.

PHP can of course run anywhere you want and manipulate the data in MySQL
which will then be reflected in Excel.

-Rasmus

On Fri, 17 May 2002, Chris Boget wrote:

  It is also possible to connect directly to MySQL from Excel via MyODBC.

 True, but only if you are running PHP on a windows platform, yes?

 Chris


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



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




RE: [PHP] PHP+MySQL - Excel ?

2002-05-17 Thread Jay Blanchard

[snip]
 It is also possible to connect directly to MySQL from Excel via MyODBC.

True, but only if you are running PHP on a windows platform, yes?
[/snip]

Nope, no PHP, just the ODBC driver would have to live on Windows

Jay


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




Re: [PHP] PHP+MySQL - Excel ?

2002-05-17 Thread Chris Boget

 No, this has nothing to do with PHP.  You can run MySQL on Windows or
 UNIX, doesn't matter, and set up a connection directly from Excel to
 MySQL.
 PHP can of course run anywhere you want and manipulate the data in MySQL
 which will then be reflected in Excel.

Are there examples anywhere that illustrate how this can be done?  I'm not very
interested in looking into this alternative.

thnx,
Chris


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




Re: [PHP] PHP+MySQL - Excel ?

2002-05-17 Thread Rasmus Lerdorf

 Are there examples anywhere that illustrate how this can be done?  I'm not very
 interested in looking into this alternative.

You are not very interested, but you want examples?  Just read the MyODBC
docs at mysql.com.

-Rasmus


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




Re: [PHP] PHP+MySQL - Excel ?

2002-05-17 Thread Chris Boget

  Are there examples anywhere that illustrate how this can be done?  I'm not very
  interested in looking into this alternative.
 You are not very interested, but you want examples?  

eep, sorry.  not should have been now.

 Just read the MyODBC docs at mysql.com.

Excellent.  Thank you very much!

Chris


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