Hi,
Jay Blanchard wrote:
Howdy,
I need to write some data out to Excel spreadsheets for some of our managers
to muddle with for projections. The query works fine...
SELECT RecordID, RecordDate, count(*) AS Quantity
FROM tblFOO
Group By RecordID, RecordDate
It returns;
[snip]
Are you satisfied? :)
[/snip]
Alexander,
Thanks for the insight, yes I am satisfied! :) Did you see my solution with
the IF statement in the SQL?
select foo,
if(bar = 'A', count(*), 0) as A,
if(bar = 'B', count(*), 0) as B,
if(bar = 'C', count(*), 0) as C
from tblFOOBAR
group by foo
Good morning Jay,
Try adding below the header in a php file output the
query data in HTML table format.
?
header(Content-Type: application/x-excel);
header(Content-Disposition: inline;
filename=\excel.xls\);
header(Expires: 0);
header(Cache-Control: must-revalidate, post-check=0,
It's been awhile since I've done this, but couldn't you build a pivot table in
Excel that would bring the data through ODBC? I did this before for a report
I needed. You can get very granular about what data goes where in Excel and
avoid the need for a bloated macro. Once the data sources and
[snip]
Good morning Jay,
Try adding below the header in a php file output the
query data in HTML table format.
?
header(Content-Type: application/x-excel);
header(Content-Disposition: inline;
filename=\excel.xls\);
header(Expires: 0);
header(Cache-Control: must-revalidate, post-check=0,
Hello Jay,
I will give you a couple ideas.. I have never tried these options to do this
job but they should work.
First option is, you can use SELECT ... INTO OUTFILE syntax. Excel
uses tab character as the column delimiter and new line character as the row
delimiter if you import a txt
[snip]
Try adding below the header in a php file output the
query data in HTML table format.
?
header(Content-Type: application/x-excel);
header(Content-Disposition: inline;
filename=\excel.xls\);
header(Expires: 0);
header(Cache-Control: must-revalidate, post-check=0,
pre-check=0);
?
At 08:01 01-05-02 -0500, Jay Blanchard wrote:
Howdy,
I need to write some data out to Excel spreadsheets for some of our managers
to muddle with for projections. The query works fine...
If you're into Perl, I believe there are at least a couple of modules
that will write out data into Excel