Export From Excel to .txt using Access

Dugantrain

Active Member
Joined
Feb 10, 2003
Messages
354
Hi, I'm looking to do the following:
Using Access, I'd like to have an Excel Workbook transfer a particular Worksheet to a .txt file. Eventually, I'll be pulling this .txt into Access, but I must first make a detour to Notepad. Going straight from Excel to Access or from Notepad to Access is easy, I just can't find the code to have Access export/import from/to non-Access applications. If noone knows and someone just has the code to transfer from Excel to Notepad from within Excel, then post that and I'll figure out the Automation to make it work from within Access.
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
Hullo. Curious why you need to get it into Notepad first? I normally hear about people trying to get TXT files which "open fine in Notepad" to Excel, so they can do something with it. I'm not saying you don't need to do this, I'm just trying to figure if there is an easier way.

So that this was not a total waste of a reply, I know for certain, and can site code later, that you CAN work directly with TXT files from Access, and I don't just mean importing them, but, treating them as a sort of "flat file" source.

HTH (y)

P
 
Upvote 0
I answered someones question on how to do an excel transfer to access. This is what you have to do, but you need to change some of the options to text.

In a macro in Access
Action: TransferSpreadsheet
Transfer Type: Import
Spreadsheet Type: MS Excel
Table Name: Type name of table in here
File Name: Path eg: c:\my documents\
 
Upvote 0

Forum statistics

Threads
1,221,531
Messages
6,160,366
Members
451,642
Latest member
mirofa

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top