Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Running export delimited macro with strange results.

Status
Not open for further replies.

gillonia

MIS
Sep 17, 2002
50
GB
MS Access 2003 SP1

Ok, apologies for what might be a really simple problem.

I'm taking data from a spreadsheet, and exporting it out to txt files using Access Macros. Instead of getting the date in the correct format I require I'm getting it as follows (ie with three digit number in front for some bizarre reason). Any thoughts or suggestions would be most appreciated.
Thnx, Ian

011 01/05/2005 00:00:00,0.00
022 02/05/2005 00:00:00,0.00
033 03/05/2005 00:00:00,312.00
044 04/05/2005 00:00:00,6.00
055 05/05/2005 00:00:00,45.00
066 06/05/2005 00:00:00,619.00
077 07/05/2005 00:00:00,0.00
088 08/05/2005 00:00:00,0.00
099 09/05/2005 00:00:00,48.00
1010 10/05/2005 00:00:00,0.00
 
Please post all of the properties for the macro, and what is "taking data from a spreadsheet"?

Code: Where the vision is often rudely introduced to reality!
 
Sorry, I should have explained more fully.

I have two actions within my macro, the first one creates a table based on a link to the spreadsheet. The second one exports from that link to a text file.

First Action is called 'TransferSpreadsheet'-

Transfer Type: Link
Spreadsheet Type:Miscrosoft Excel 8-10
Table Name:Late Authorisations
File Name:<Drive><Path>Current ms-perf.xls
Has Field Names: No
Range:Late Auths!A28:B58


Second Action is called 'TransferText' -
Transfer Type: Export Delimited
Specification name:
Table Name:Late Authorisations
File Name:<Drive><Path>Late Auths.txt
Has Field Names: No
HTML Table Name:
Code Page:

The text file gets created successfully but the dates have spurious characters in front of them:

011 01/05/2005 00:00:00,0.00 instead of 01/05/2005 00:00:00,0.00
022 02/05/2005 00:00:00,0.00 instead of 02/05/2005 00:00:00,0.00
033 03/05/2005 00:00:00,312.00 instead of 03/05/2005 00:00:00,312.00
044 04/05/2005 00:00:00,6.00 instead of 04/05/2005 00:00:00,6.00
055 05/05/2005 00:00:00,45.00 instead of 05/05/2005 00:00:00,45.00
066 06/05/2005 00:00:00,619.00 instead of 06/05/2005 00:00:00,619.00
077 07/05/2005 00:00:00,0.00 instead of 07/05/2005 00:00:00,0.00
088 08/05/2005 00:00:00,0.00 instead of 08/05/2005 00:00:00,0.00
099 09/05/2005 00:00:00,48.00 instead of 09/05/2005 00:00:00,48.00
1010 10/05/2005 00:00:00,0.00 instead of 10/05/2005 00:00:00,0.00

when I look at the table the data is fine though the date format has a 'Day':

Sun 01/05/2005 00:00:00
Mon 02/05/2005 00:00:00
Tue 03/05/2005 00:00:00

Any thoughts/suggestions most appreciated.
Thnx, Ian
 
I'm away from my XP box until late today, but I had no problem using Win-2000.
1. Are you sure you don't have a hidden column in the Excel input?
2. Do you have a special format defined for the first column?


Code: Where the vision is often rudely introduced to reality!
 
Thnx again for your reply

1. No hidden columns unfortunately
2. No formatting being done. Just a simple export. This issue is happening with all my other Macros that export data with dates so I'm thinking it must be a application-wide setting somewhere.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top