Solved

Using Access VBA and Excel to scrub and import a CSV file

Posted on 2002-07-29
4
278 Views
Last Modified: 2010-05-18
I am using Access 97 VBA to open a CSV file using Excel 97, trim the key column, and then import it into an Access table, maintaining the CSV format until it gets to Access.  

My problem is this: When VBA goes to save the file in Excel as a CSV, Excel still asks me if I want to convert to Excel 97 format.  Meanwhile, my Access VBA code continues to run and tries to open the CSV file that is supposed to be saved, closed, and available.  

Is there a way to turn off this convert to Excel 97 prompt?

Thanks in advance for your help.
0
Comment
Question by:DVAJLOG
4 Comments
 
LVL 1

Expert Comment

by:kess
ID: 7186185
I run into this all the time with excel.
I think it is caused by having or have had any other version of Office on your computer. Even if you uninstalled the other version it can still be a problem.
Microsoft has some articles in the KB.
To completely uninstall Office look at Q254250.
It looks like a real pain.

Good Luck
Kess
0
 
LVL 1

Expert Comment

by:glennwaldron
ID: 7187232
Why don't you just import it into access directly and skip the Excel step.

You can write code to open the file and read the text file line by line. If it is delimited you can pick out the bits you want and trim them.

Using a recordset you can then put it straight into your table.

This would be easier than what you are doing.

Let me know if you need help.

Glenn
0
 
LVL 54

Expert Comment

by:nico5038
ID: 7284551

No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
 - PAQ'd and pts removed
Please leave any comments here within the
next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !

Nic;o)
0
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
ID: 7327431
Question placed in PAQ

Computer101
E-E Admin
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Syntax Error in Query 7 30
Error in query expression 3 36
Importing and Dropping Table in Access 11 24
field number type in access tabledefs fields 5 18
The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now