|
|
Welcome Guest ( Log In | Register ) · View New Posts · View Unanswered Topics
![]() ![]() |
|
|
Dec 2 2008, 05:26 PM
Post
#1
|
|
|
New Member Posts: 2 |
I want a general solution to the following problem:
PROBLEM: Export all tables in an .mdb file to CSV ***with column headers*** PARTIAL SOLUTION: I've successfully exported all the tables using a for each loop. The code for my solution is here: http://opensourceeconomics.wordpress.com/2...umption-survey/ But the thing I can't get is to get the column headers to appear. I have searched utteraccess and google for solutions, but haven't found one. Two posts on UA are helpful: *** http://www.utteraccess.com/forums/showflat...;Number=1736578 discusses schema.ini a little, but then found the error was in another argument to TransferText. *** http://www.utteraccess.com/forums/printthr...amp;type=thread talks about where the specification is stored. (i.e., we can't find it except via the menus) I couldn't find the schema.ini file. I did note that while running the script, a file called export.ini file was created temporarily but then erased.. The other thought is to close all applications, save a new schema, and then look for any files changed in the last 5 minutes; then grep them to find the schema header(???) BTW: If you want to look at the mdb that I'm using as source data, download it here: http://www.eia.doe.gov/emeu/recs/recs97/publicaccess.html Thanks! |
|
|
|
Dec 2 2008, 07:47 PM
Post
#2
|
|
|
UtterAccess VIP Posts: 4,080 From: North Carolina, USA |
Are you not using the TransferText Method? It has an argument for including field names as the header.
Edit: Duh, re-read title -- you are... Have you tried using that argument for fields? -------------------- |
|
|
|
Dec 2 2008, 08:32 PM
Post
#3
|
|
|
New Member Posts: 2 |
QUOTE Are you not using the TransferText Method? It has an argument for including field names as the header. Edit: Duh, re-read title -- you are... Have you tried using that argument for fields? You are a genius (and I am bad at reading documentation). You solution is 100% correct and I am changing my post and linking back to this page. Thanks!!! |
|
|
|
Dec 2 2008, 09:14 PM
Post
#4
|
|
|
UtterAccess VIP Posts: 4,080 From: North Carolina, USA |
By the way, Welcome to UA! -o! -------------------- |
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 30th July 2010 - 11:14 AM |