Advertisement

09.19.2007 at 07:42AM PDT, ID: 22838820
[x]
Attachment Details

Import a Text File into Excel Using a VBA Routine

Asked by sydodman in Access Coding/Macros, Microsoft Excel Spreadsheet Software

Tags: , , , ,

Microsoft Excel Queston
VBA Code Request

I have a software package that exports data in a text file in the following format.  It is split into 7 columns each column seperated by 5 spaces.  To signify a new row there are four spaces then a carriage return.  I need to write a simple code routine that I can attach to a button in Excel.  The button when clicked will let me select the text file (via the normal File Cirectory method) Im trying to import and then the data will be added into an Excel sheet in columns A to G and over as many rows as there are carriage returns in the text file.  For info the file is constructed like this where * indicates a space and CR indicates a carriage return.  Note:  There are thousands of lines!!!!

*101*****102*****103*****104*****105*****106*****107****CR
*108*****109*****110*****111*****112*****113*****114****CR
*115*****116*****117*****118*****119*****120*****121****CR
etc. etc

Thanks in advance for any help!!!Start Free Trial
[+][-]09.19.2007 at 08:04AM PDT, ID: 19921244

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.19.2007 at 08:15AM PDT, ID: 19921372

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.19.2007 at 08:20AM PDT, ID: 19921421

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Access Coding/Macros, Microsoft Excel Spreadsheet Software
Tags: excel, import, file, text, vba
Sign Up Now!
Solution Provided By: webtubbs
Participating Experts: 1
Solution Grade: A
 
 
[+][-]09.19.2007 at 08:31AM PDT, ID: 19921566

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.19.2007 at 09:04AM PDT, ID: 19921952

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.19.2007 at 09:10AM PDT, ID: 19922012

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.19.2007 at 09:21AM PDT, ID: 19922122

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.19.2007 at 09:23AM PDT, ID: 19922132

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_1_20070628