 |
| MySQL General discussion about the MySQL database. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the MySQL section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

September 22nd, 2010, 02:12 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2008
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts
|
|
I haven't use OUTFILE with Windows, only with Linux.
But in Windows, shouldn't the path use \ and *NOT* / ???
f:\result.xls
And of course you will have to give the right permissions to f:
And, finally, I don't see how that creates an ".xls" file. That will just create a text file, not a proper CSV file, won't it??
|
|

September 22nd, 2010, 10:27 PM
|
|
Authorized User
|
|
Join Date: Mar 2006
Posts: 58
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Thanks Old Pedant, I am not fimiliar with it, any best solution you had, in order make downloaded to EXCEL format. Tried will all t echnique, remain failed 
|
|

September 23rd, 2010, 02:00 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2008
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts
|
|
Well, a CSV file normally has the format
Code:
"id","product","quantity"
73,"basket",17
33,"wheel",2
So clearly you could write your SQL SELECT to produce that. Tedious, but possible.
Personally, I'd use PHP or ASP or even VB to read the data and convert it to CSV, but that's up to you.
|
|

September 23rd, 2010, 06:03 PM
|
|
Authorized User
|
|
Join Date: Mar 2006
Posts: 58
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Ok thanks, how should I code it it, want to try and convert it to EXCEL, i do need to produce in EXCEL format.
Regards.
|
|

September 23rd, 2010, 08:32 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2008
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts
|
|
You can't produce Excel format easily. The best compromise is to produce ".csv" format (which I showed in post #13), which Excel *can* read.
|
|

September 23rd, 2010, 09:23 PM
|
|
Authorized User
|
|
Join Date: Mar 2006
Posts: 58
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Ermm..thanks for the solution, do we have other alternative instead of using temporary table in Mysql 4.01 as your example shown before...
Anyway I do thanks a lot for your helping and advice, may god bless.
|
|
 |