By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,968 Members | 1,843 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,968 IT Pros & Developers. It's quick & easy.

acExportDelim With Leading Zeros

P: n/a
Using A2k

Exporting a query to a CSV file. The problem is any text fields (i.e. 000345)
lose any leading zeros.

Exporting to an excel file this problem does not exist.

Tried to create a SpecificationName via the Export Wizard without success.
Obviously doing something wrong.

Any suggestions appreciated. Thanks in advance.


"And.... Exactly at which point did you consider this a good idea?"
Nov 12 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
On 16 Jan 2004 02:28:11 GMT in comp.databases.ms-access,
cl*******@aol.comNoSpam (Clint Stowers) wrote:
Using A2k

Exporting a query to a CSV file. The problem is any text fields (i.e. 000345)
lose any leading zeros.

Exporting to an excel file this problem does not exist.

Tried to create a SpecificationName via the Export Wizard without success.
Obviously doing something wrong.

Any suggestions appreciated. Thanks in advance.


You need to create a query, the formatted field should be in the grid
as something like:

Aliasname: Format(FieldName,"000000")

Then export the query.

--
A)bort, R)etry, I)nfluence with large hammer.
Nov 12 '05 #2

P: n/a

Have taken the query that has a field "SalesOrder" (sample:000123) and in the
same query created field "NewSalesOrder: Format([SalesOrder],"000000").

When I export this query using acExportDelim fields fail to maintain the
leading zeros.

Any thoughts?

"And.... Exactly at which point did you consider this a good idea?"
Nov 12 '05 #3

P: n/a
On 16 Jan 2004 15:48:12 GMT in comp.databases.ms-access,
cl*******@aol.comNoSpam (Clint Stowers) wrote:

Have taken the query that has a field "SalesOrder" (sample:000123) and in the
same query created field "NewSalesOrder: Format([SalesOrder],"000000").

When I export this query using acExportDelim fields fail to maintain the
leading zeros.

Any thoughts?


Do you have an export specification in place that is still treating
this column as numeric?

--
A)bort, R)etry, I)nfluence with large hammer.
Nov 12 '05 #4

P: n/a
In article <g0********************************@4ax.com>, Trevor Best
<bouncer@localhost> writes:
Do you have an export specification in place that is still treating
this column as numeric?


I removed the SpecificationName just in case. Leading zeros in both the
orignal field and the formated field were removed.

However I found this to be the case when exporting to "MyFile.csv". When
exported to "MyFile.txt", both field maintain the leading zeros.

Currently checking to see if the software being export to will axcept an "txt"
extention. The text file should survice in that the data contains no true
numeric data. Just account and zipcodes. So I this point there may be no need
to reinvent the wheel.

Althought it would be nice to know why I can't place the leading zeros in the
"cvs" file.

"And.... Exactly at which point did you consider this a good idea?"
Nov 12 '05 #5

P: n/a
On 16 Jan 2004 21:46:43 GMT in comp.databases.ms-access,
cl*******@aol.comNoSpam (Clint Stowers) wrote:
In article <g0********************************@4ax.com>, Trevor Best
<bouncer@localhost> writes:
Do you have an export specification in place that is still treating
this column as numeric?


I removed the SpecificationName just in case. Leading zeros in both the
orignal field and the formated field were removed.

However I found this to be the case when exporting to "MyFile.csv". When
exported to "MyFile.txt", both field maintain the leading zeros.

Currently checking to see if the software being export to will axcept an "txt"
extention. The text file should survice in that the data contains no true
numeric data. Just account and zipcodes. So I this point there may be no need
to reinvent the wheel.

Althought it would be nice to know why I can't place the leading zeros in the
"cvs" file.


I don't know if it has anything to do with Excel being the registered
application for opening .csv files but it has to be said, Excel is a
pile of poo when it comes to handling data. Only the other day I was
exporting data to Excel, which consisted mostly of dates. Being in the
UK all my settings are UK, including dates (dd/mm/yyyy) even so, Excel
would only treat the dates that were valid in US format (e.g.
03/04/2004) as dates and right aligned, all others (e.g. 13/01/2004)
were treated as text and left aligned.

--
A)bort, R)etry, I)nfluence with large hammer.
Nov 12 '05 #6

P: n/a
In article <sm********************************@4ax.com>, Trevor Best
<bouncer@localhost> writes:
I don't know if it has anything to do with Excel being the registered
application for opening .csv files but it has to be said, Excel is a
pile of poo when it comes to handling data.


What is being created is just an intermidiate file to be wused between two
external software applications. I don't believe Excel is at issue at the
moment. I origionally exported the data to an excel file without ill affect,
then asked to make it a cvs file.

But due to what has previously been mentioned a "txt" file should survice. And
due to skill level may have to survice. At least for the moment.

"And.... Exactly at which point did you consider this a good idea?"
Nov 12 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.