[DUG] SQL question

Todd Martin toddm at kol.co.nz
Fri Jun 24 14:13:55 NZST 2005


Hi Mark

I've played around with CSV files with Excel a bit and found Excel to be a 
bit frustrating. If you format '32.3' as '32.30' Excel will only display the 
value correctly as text. Presumably the end user only wants to "look" at the 
data, rather than edit it, sum columns etc.

If the use needs to do a bit more useful stuff with the data inside Excel, 
your best solution would be to output an XLS file with correct cell 
formatting instead of a CSV file. There are some native Delphi free 
components available to help do this. TXLSRead/TXLSWrite I haven't used them 
myself, but I hear they work well.

Todd.


----- Original Message ----- 
From: "Mark Howard" <mhoward at pslog.co.nz>
To: <delphi at ns3.123.co.nz>
Sent: Friday, June 24, 2005 11:23 AM
Subject: [DUG] SQL question


> Can anyone suggest a way to return a figure of (say) 32.30 from a SQL 
> SELECT statement, instead of the 32.3?
> I would like the returned number formatted as I'm just sending the dataset 
> straight out to a CSV file.
>
> I'm using DBISAM but I'm willing to try ANY suggestions to see if they 
> work.
>
> TIA
>
> Mark
>
> -- 
> Forest Production Systems Ltd
> Creators of PSLog - A harvesting information system
> www.pslog.co.nz
>
>
> -- 
> No virus found in this outgoing message.
> Checked by AVG Anti-Virus.
> Version: 7.0.323 / Virus Database: 267.8.0/27 - Release Date: 23/06/2005
>
> _______________________________________________
> Delphi mailing list
> Delphi at ns3.123.co.nz
> http://ns3.123.co.nz/mailman/listinfo/delphi
>
> 



-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.323 / Virus Database: 267.7.10/25 - Release Date: 21/06/2005



More information about the Delphi mailing list