Computing.Net > Forums > Office Software > Excel 2002 Text import wizard

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Excel 2002 Text import wizard

Reply to Message Icon

Name: tomjcip
Date: June 8, 2004 at 04:23:12 Pacific
OS: windows 2000
CPU/Ram: P4 - 256meg
Comment:

Is there any way to change the default delimiter of tab when opening a text file with the text inport wizard.

Thanks
Tom




Sponsored Link
Ads by Google

Response Number 1
Name: chnos
Date: June 9, 2004 at 00:01:00 Pacific
Reply:

yes, when converting datas,in options choose "fixed lenght" and place ur separator where u want to


0

Response Number 2
Name: Report_2
Date: June 9, 2004 at 04:03:49 Pacific
Reply:

Taxi, I am unable to locate the 'Convert data'???

Tom,

If you use a Macro to open your text file then you can set it as Fixed Width.

Sub FixedWidth()
'
' FixedWidth Macro
' Macro recorded 06/09/2004 by Bryco
'

'
myFile = Application.GetOpenFilename("Text Files,*.txt")
Workbooks.OpenText FileName:=myFile, _
StartRow:=1, DataType:=xlFixedWidth
End Sub

Paste the above into the VBA Editor and save the New workbook as 'FixedWidth' or whatever you like. Assign a Shortcut to it for ease of use. In Sheet1 of the workbook, in any cell, note which keys activate the shortcut.
Save it again. If you save it in the location of your .txt files then it is faster.

When you want to import a Text file just open this workbook and activate the macro to get your .txt file.

If your text files are always the same and you format them the same then use the VBA recorder to record the entire process and then just replace the first line up to and including StartRow:=1 with:
myFile = Application.GetOpenFilename("Text Files,*.txt")
Workbooks.OpenText FileName:=myFile, _
StartRow:=1

Of course retain your actual Start row.

When you record the macro it will record the actual file name that you opened during the recording. The above line replaces that and will open the Open files dialog box where you select the text file to be opened. If that folder is the same folder that you stored the macro worksheet then it will open to that folder too.

Following the FixedWidth entry will be the FieldInfo: in Arrays.

After that you can add the line:
Sheets.Move Before:=Workbooks("xxxxxx.xls").Sheets(1)

Replace the xxxxxx.xls with a name you want it to be.

and it will move the data to a new workbook instead of your workbook containing your macro.

The formatting on this forum does not look pretty but it should format correctly within the VBA editor.

The above seems like a lot but it is not. It just takes alot of verbiage to explain it.

HTH
Bryan


0

Response Number 3
Name: tomjcip
Date: June 9, 2004 at 07:53:58 Pacific
Reply:

Taxi, I did not see the convert data either.

Bryan

Thank you very much. This solved by problem. I did not even think of a macro (I am not sure why). I just recored it and it worked fine.

Tom



0

Response Number 4
Name: Report_2
Date: June 9, 2004 at 11:27:19 Pacific
Reply:

Tom,

Glad you got resolution.

Regards,
Bryan


0

Response Number 5
Name: chnos
Date: June 9, 2004 at 23:45:24 Pacific
Reply:

it's in the tools menu . In french version it's call "convert" and located in the 7th position starting from top in this menu. Sorry, i'vnt got a US version...So guys, u'r talkin cross the oceans, don't forget it! see u next


0

Related Posts

See More



Response Number 6
Name: Report_2
Date: June 13, 2004 at 06:18:28 Pacific
Reply:

Taxi, I certainly do not intend to take anything away from what you are saying but I still don't see it in my version of Excel 8 of Office 97.

As you can see at Tools Menu .swf

Best Regards,
Bryan


0

Response Number 7
Name: chnos
Date: June 13, 2004 at 09:30:01 Pacific
Reply:

hoops, it's the "data" menu...Hips, i was a little bit "walking beside my shoes" as we said here...Sorry Brian.Ur animation is cool, what do u use to have it..?


0

Response Number 8
Name: Report_2
Date: June 13, 2004 at 19:05:47 Pacific
Reply:

Taxi, I don't find it under Data either. I had checked all the menus. Is it an addon? Perhaps I elected not to install it years ago when I installed Excel on this machine.

I used CamStudio V2.
The newer version that is still available does not have the capability to convert the movies to .swf files like the one I used. They are considerably smaller in size then the .avi files being the other option.

I do have the installer package for it if interested. It is 1,334kb in size. The newer version (2.1) is over 9MB in size.

A while ago I went on a search for this version and found it on like page 7 of a Google search and I can not believe that I did not book mark it.

Let me know,
Bryan


0

Response Number 9
Name: chnos
Date: June 14, 2004 at 00:08:52 Pacific
Reply:

yes, please send it. In response i'll give u a screenshot of my excel (i haven't got ur mail)


0

Response Number 10
Name: Report_2
Date: June 14, 2004 at 03:49:54 Pacific
Reply:

Right click and select "Save Target As" on the following link:
CamStudio V2. 1,334kb

Let me know as soon as you have it so I can take it off of my webspace.

It is a very simple Screen capture program. I went into the preferences to set it to convert the movies into .swf format. I always use the Region caprure versus the full screen. Maybe a faster processor or video card could handle the full screen better.

This program has been bought out by Macromedia and they sell it now under another name.

Regards,
Bryan


0

Response Number 11
Name: chnos
Date: June 14, 2004 at 04:42:16 Pacific
Reply:

i got it. Workin fine. Thank u .


0

Response Number 12
Name: Report_2
Date: June 14, 2004 at 05:43:00 Pacific
Reply:

I am now taking it and the animation off of my webspace.

Bryan


0

Response Number 13
Name: SamX
Date: June 16, 2004 at 11:05:24 Pacific
Reply:

I am using the following syntax to open a .txt file:

Workbooks.OpenText Filename:= _
"C:\fname01.txt", _
Origin:=xlWindows, StartRow:=1, DataType:=xlFixedWidth, FieldInfo:= _
Array(0, 2), TrailingMinusNumbers:=True

I want to be able to open several files one at a time with names from fname01.txt to fname50.txt

Can you help?


0

Response Number 14
Name: Report_2
Date: June 16, 2004 at 14:15:08 Pacific
Reply:

Sam, I tried my code but it will only allow the selection of a single .txt file at a time.

I suggest you post another thread asking the same question or post it on the OzGrid Excel/VBA forum board.

There are some folks there that have such knowledge that it makes me feel like I know nothing about Excel or VBA. They are good. If it can be done then they will know how to code it.
I have gotten a lot of help from them.

I did search their boards but found nothing. Also, they reformatted their site and so many of the past posts are unable to display the code correctly.

Regards,
Bryan


0

Sponsored Link
Ads by Google
Reply to Message Icon






Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Office Software Forum Home


Sponsored links

Ads by Google


Results for: Excel 2002 Text import wizard

Goal seeking in Excel 2002 www.computing.net/answers/office/goal-seeking-in-excel-2002/1473.html

MS Excel 2002 wont open a PDF link www.computing.net/answers/office/ms-excel-2002-wont-open-a-pdf-link/5209.html

Excel 2002 doesnt open in XP www.computing.net/answers/office/excel-2002-doesnt-open-in-xp/2257.html