Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 236
Default Can you save options selected in Text Import Wizard?

Importing text with the Macro Recorder on gives me a macro like...
Workbooks.OpenText Filename:="D:\Test\Data\Test.txt", _
Origin:=xlWindows, StartRow:=1, _
DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, _
ConsecutiveDelimiter:=False, _
Tab:=True, Semicolon:=False, _
Comma:=False, Space:=False, Other:=False, _
FieldInfo:=Array(Array(1, 3), _
Array(2, 1), Array(3, 2))

Does anyone know of a way to capture the settings such as Origin, StartRow,
DataType, TextQualifier, Tab, etc...

I want the user to be able to pick several text files that will be
imported to Excel. The files for any one 'picking' session will have the
same format. I want to be able to have the user import the first file using
the Import Wizard. I'm fine up through here.
With that information, I can then automatically import the rest of the
files. BUT, I don't know how to capture the information entered by the user
in the Import Wizard. ie what the user put for StartRow, Arrays, etc.
Any help would be appreciated.
Sincerely,
Gary Brown

--

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Can you save options selected in Text Import Wizard?

It is captured in your recorded code.

Other than that, you can't.

--
Regards,
Tom Ogilvy


"Gary Brown" wrote in message
...
Importing text with the Macro Recorder on gives me a macro like...
Workbooks.OpenText Filename:="D:\Test\Data\Test.txt", _
Origin:=xlWindows, StartRow:=1, _
DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, _
ConsecutiveDelimiter:=False, _
Tab:=True, Semicolon:=False, _
Comma:=False, Space:=False, Other:=False, _
FieldInfo:=Array(Array(1, 3), _
Array(2, 1), Array(3, 2))

Does anyone know of a way to capture the settings such as Origin,

StartRow,
DataType, TextQualifier, Tab, etc...

I want the user to be able to pick several text files that will be
imported to Excel. The files for any one 'picking' session will have the
same format. I want to be able to have the user import the first file

using
the Import Wizard. I'm fine up through here.
With that information, I can then automatically import the rest of the
files. BUT, I don't know how to capture the information entered by the

user
in the Import Wizard. ie what the user put for StartRow, Arrays, etc.
Any help would be appreciated.
Sincerely,
Gary Brown

--



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 236
Default Can you save options selected in Text Import Wizard?

Thanks Tom.
I thought that was the case but I wanted to check.
I appreciate your response.
Sincerely,
Gary Brown


"Tom Ogilvy" wrote:

It is captured in your recorded code.

Other than that, you can't.

--
Regards,
Tom Ogilvy


"Gary Brown" wrote in message
...
Importing text with the Macro Recorder on gives me a macro like...
Workbooks.OpenText Filename:="D:\Test\Data\Test.txt", _
Origin:=xlWindows, StartRow:=1, _
DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, _
ConsecutiveDelimiter:=False, _
Tab:=True, Semicolon:=False, _
Comma:=False, Space:=False, Other:=False, _
FieldInfo:=Array(Array(1, 3), _
Array(2, 1), Array(3, 2))

Does anyone know of a way to capture the settings such as Origin,

StartRow,
DataType, TextQualifier, Tab, etc...

I want the user to be able to pick several text files that will be
imported to Excel. The files for any one 'picking' session will have the
same format. I want to be able to have the user import the first file

using
the Import Wizard. I'm fine up through here.
With that information, I can then automatically import the rest of the
files. BUT, I don't know how to capture the information entered by the

user
in the Import Wizard. ie what the user put for StartRow, Arrays, etc.
Any help would be appreciated.
Sincerely,
Gary Brown

--




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Start Excel in Text Import Wizard for data import rlelvis Setting up and Configuration of Excel 0 July 10th 08 08:40 PM
Can you change the Text Import Wizard column options SteveB Excel Discussion (Misc queries) 3 July 28th 06 04:00 PM
Text Import Wizard Duncan Help Excel Discussion (Misc queries) 0 July 27th 06 02:33 PM
Can I save a re-useable template for Text Import Wizard? Sinhavacin Excel Discussion (Misc queries) 3 September 9th 05 09:07 AM
Text Import Wizard from vba Ömer Ayzan Excel Programming 2 April 8th 05 08:29 AM


All times are GMT +1. The time now is 04:12 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"