Paul Kraus wrote:

> Is there a way to write a CSV file so that excel wont drop the leading
> zero's from fields? I could use spreadsheet::writeexcel or OLE but
> that's like using a sledgehammer for something that needs to be hand
> tightened.
>
> Thanks.
> Paul

Leading zeroes are meaningful only in strings.  If you want leading zeroes
in your data, signify that the value is a string by quoting it.  It will
totally make a hash of any numerical functions on the field, but if
leading zeroes are that important...

You could also think about the proper place to concern yourself with data,
and where to concern yourself with it's representation.  A database table,
such as a CSV file, has one set of needs.  A report has a comletely
different set.  Don't wate energy trying to line things up verticall in
stored data.  Just translate to your desired presentation format on
extraction.

So why do you need leading zeroes?

Joseph


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to