RE: [PHP] Exporting Dbase to CSV

2004-09-02 Thread Jay Blanchard
[snip]
"Jay Blanchard" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
>
> What, exactly, do you mean? A CSV file that resembles a spreadsheet? A
> doc with CSV?

The term "CSV" is very common; it means "Comma Separated Values". It is
the 
format that originally was (and is) used by the Basic language. When
someone 
says "CSV format" or "CSV file" I understand quite well what they mean
or 
should mean. It is not a standard format, but it is nearly standard.

I have no idea what a "CSV file that resembles a spreadsheet" is and I 
especially have no idea what a "doc with CSV" is. The definition of
those 
however are probably not important here, except they are much less
likely to 
be understood than the term "CSV format".
[/snip]

Sam,

Thanks for bringing this back up. I know what a CSV file is, but the
original poster asked a fairly ambiguous question, so I was attempting
to get him to clarify what he was looking for.

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



Re: [PHP] Exporting Dbase to CSV

2004-09-02 Thread Sam Hobbs
"Jay Blanchard" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
>
> What, exactly, do you mean? A CSV file that resembles a spreadsheet? A
> doc with CSV?

The term "CSV" is very common; it means "Comma Separated Values". It is the 
format that originally was (and is) used by the Basic language. When someone 
says "CSV format" or "CSV file" I understand quite well what they mean or 
should mean. It is not a standard format, but it is nearly standard.

I have no idea what a "CSV file that resembles a spreadsheet" is and I 
especially have no idea what a "doc with CSV" is. The definition of those 
however are probably not important here, except they are much less likely to 
be understood than the term "CSV format".

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



Re: [PHP] Exporting Dbase to CSV

2004-08-26 Thread Torsten Roehr
"Harlequin" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I'm using MySQL Jay
>
> I can present the results in a table easy enough and if I replace the TD
> TAGs with commas etc. I get a screen output that resembles a CSV file but
> need to go that one step further and don't know how...

Please specify what you mean with "one step further"? You can assign the
contents to a variable and write it to a file.

Regards, Torsten Roehr


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



RE: [PHP] Exporting Dbase to CSV

2004-08-26 Thread Jay Blanchard
[snip]
I'm using MySQL Jay

I can present the results in a table easy enough and if I replace the TD
TAGs with commas etc. I get a screen output that resembles a CSV file
but
need to go that one step further and don't know how...
[/snip]

Use CSV (without the table thing) and place Excel header definitions in
the script

header("Content-Type:  application/vnd.ms-excel");
header("Content-Disposition: inline; filename=\"excel.xls\"");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");


and then an example from one of our spreadsheet outputs

print($rowage->TmsNoLines . ",");
print($rowage->TmsStatus . ",");
print($rowage->TmsPaidDate . ",");
print(number_format($rowage->Current, 2, '.', '') . ",");
print(number_format($rowage->Thirty, 2, '.', '') . ",");
print(number_format($rowage->Sixty, 2, '.', '') . ",");
print(number_format($rowage->Ninety, 2, '.', '') . ",");
print(number_format($rowage->OneTwenty, 2, '.', '') . ",\n");

We usually make the link open in a new window when outputting sheets
like this. All the user needs to do is save it locally at that poiint.

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



Re: [PHP] Exporting Dbase to CSV

2004-08-26 Thread Harlequin
I'm using MySQL Dan

I can present the results in a table easy enough and if I replace the TD
TAGs with commas etc. I get a screen output that resembles a CSV file but
need to go that one step further and don't know how...

-- 
-
 Michael Mason
 Arras People
 www.arraspeople.co.uk
-
"Dan Joseph" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi,
>
> Depending on which database you're using, there is the UNLOAD
> function.  Do a google for it, should find the answers.
>
> > I've seen many different posts on this subject and try as I might I
can't
> > get my data to output to CSV for a user to save.
> >
> > I can output to a table, I can output to screen in CSV format but that
> > just
> > means massing about with copy and paste.
> >
> > Has anyone got any suggestions...?
>
> -Dan Joseph

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



Re: [PHP] Exporting Dbase to CSV

2004-08-26 Thread Harlequin
I'm using MySQL Jay

I can present the results in a table easy enough and if I replace the TD
TAGs with commas etc. I get a screen output that resembles a CSV file but
need to go that one step further and don't know how...

-- 
-
 Michael Mason
 Arras People
 www.arraspeople.co.uk
-
"Jay Blanchard" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
[snip]
I've seen many different posts on this subject and try as I might I
can't
get my data to output to CSV for a user to save.

I can output to a table, I can output to screen in CSV format but that
just
means massing about with copy and paste.

Has anyone got any suggestions...?
[/snip]

What, exactly, do you mean? A CSV file that resembles a spreadsheet? A
doc with CSV?

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



RE: [PHP] Exporting Dbase to CSV

2004-08-26 Thread Dan Joseph
Hi,

Depending on which database you're using, there is the UNLOAD
function.  Do a google for it, should find the answers.

> I've seen many different posts on this subject and try as I might I can't
> get my data to output to CSV for a user to save.
> 
> I can output to a table, I can output to screen in CSV format but that
> just
> means massing about with copy and paste.
> 
> Has anyone got any suggestions...?

-Dan Joseph

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



RE: [PHP] Exporting Dbase to CSV

2004-08-26 Thread Jay Blanchard
[snip]
I've seen many different posts on this subject and try as I might I
can't
get my data to output to CSV for a user to save.

I can output to a table, I can output to screen in CSV format but that
just
means massing about with copy and paste.

Has anyone got any suggestions...?
[/snip]

What, exactly, do you mean? A CSV file that resembles a spreadsheet? A
doc with CSV?

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



[PHP] Exporting Dbase to CSV

2004-08-26 Thread Harlequin
I've seen many different posts on this subject and try as I might I can't
get my data to output to CSV for a user to save.

I can output to a table, I can output to screen in CSV format but that just
means massing about with copy and paste.

Has anyone got any suggestions...?

-- 
-
 Michael Mason
 Arras People
 www.arraspeople.co.uk
-

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