Whos the real excel guru round here??????


Posted by Johno on October 26, 2001 4:09 AM

hi everyone,

I need the help of an excel guru!!!

I have a text file(with comma seperated entries) that i want to bring into excel using a macro.

I can open a xls from a macro automatically but i need to set things such as what line the data begins, what seperation character is used and the field formats.(As you would on on importing a text file thru the menus)

Does anyone know if this can be done, and if so how do i set the code to tell it for example to use data from line 12 on and the seperation char is a ","

Help me, thanks in advance..
Johno

Posted by Bob Umlas on October 26, 2001 4:38 AM


---------------------------
VERY simple: RECORD a macro to do this, & you're all set!! No guru needed (but you got one! <g>)
Bob Umlas
Excel MVP

Posted by johno on October 26, 2001 4:39 AM

thats my problem i'm new to vb and macros and don't know where to start!!!!
any snippets of code???
ta


Posted by Bob Umlas on October 26, 2001 4:44 AM

Tools/Macro/Record new macro
Give it a name
MANNUALLY open this text file & select the appropriate things from the Text Import Wizard. Once your file is open, click the macro recording toolbar black square to stop recording.
Close the text file. Test your macro via
Alt/F8 & select the macro you just recorded.
See if it opens your file OK.
So that you can open OTHER files, press Alt/F11 to see the code, and you may only have to change the filename inside the code you'll see.
Good luck.




Posted by Barrie Davidson on October 26, 2001 6:53 AM

Bob Umlas, a question for you....

How did you become an Excel MVP?

Regards,
Barrie