Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
| Search | Today's Posts | Mark Forums Read
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old March 17th, 2005, 05:00 AM
Registered User
 
Join Date: Mar 2005
Location: , , .
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Automation with Access and Excel

Hey
I'm not sure if this is the right forum for this, but I thought it was the most suitable one.

I have a question regarding automating a certain process:

I have a txt file that I import to Excel (as fixed width file, and changing some of the import settings) change certain fields in Excel
Then import that Excel File into Access and perform a single query, the result back to excel, a simple change of one field

I need to perform this every week, my question is if there is any way to do that automatically

Any links to useful info would be appreciated, I must emphasize I know almost nothing about automation with Office

Thanks in advance
Elad
  #2 (permalink)  
Old March 17th, 2005, 12:03 PM
Friend of Wrox
 
Join Date: Jan 2005
Location: Kansas City, Missouri, USA.
Posts: 471
Thanks: 0
Thanked 1 Time in 1 Post
Default

Elad,

You can read your text file in Access, load it to a table, run your query and export it back to excel. All with VB.

1. Is the text file always in the same format?
2. Are the fields in the text file fixed with, or delimited?
3. What are you changing in excel before you import the excel file to access?

Kevin


dartcoach
  #3 (permalink)  
Old March 20th, 2005, 11:34 AM
Registered User
 
Join Date: Mar 2005
Location: , , .
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hey Kevin

My text file is always the same format, and fixed width
In Excel I only remove two lines after the import takes place (which won't make any problem if I won't because it will disregard it in access)

Problem with the fixed width is that sometimes it adds extra separators I don't need like separating the date into 3 different fields (day, month, year) instead of having the whole 3 in the same field, which is very easy to take care of manually


Thanks again for your reply
and sorry it took me a while to answer
Elad


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel Automation MAKO C# 0 August 16th, 2006 01:05 PM
Excel Automation ameysun C# 0 November 4th, 2004 07:33 AM
Excel Automation ameysun Pro VB 6 0 November 4th, 2004 02:55 AM
access to excel automation...seem to still have a mytfein Access VBA 0 September 9th, 2004 09:35 AM
Access ro Excel Automation Sample Code galefly Access VBA 2 November 30th, 2003 07:29 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.