LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 142
Default Help with macro. Import text file (fixed width)

Hello,

I have the following macro to import a text file (fixed width).

Sub Macro1()
'
' Macro1 Macro
' Macro recorded 24/03/2008 by
'

'
ChDir "C:\Documents and Settings\rambo\Desktop\ST ReCON"
Workbooks.OpenText Filename:= _
"C:\Documents and Settings\rambo\Desktop\ST ReCON\STS 24.TXT",
Origin:= _
437, StartRow:=1, DataType:=xlFixedWidth,
FieldInfo:=Array(Array(0, 1), _
Array(30, 2), Array(42, 1), Array(56, 1), Array(90, 1),
Array(140, 1)), _
TrailingMinusNumbers:=True
Cells.Select
Selection.Columns.AutoFit
ActiveWindow.Zoom = 85

End Sub

Things I want to add a
- Simple button in sheet to start macro
- Ask for text file destination folder
- Delete first 8 rows
- Delete row with 4 or more character '----'
- Delete row with word containing total
- Delete row with 4 or more character '===='
- All data asending order with respect to columnC (entire data & not
just columnC).
 
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
Fixed Width Text Import Settings Bryan Excel Discussion (Misc queries) 4 July 8th 08 12:15 AM
Macro for importing a fixed width text file into the activeworkbook Koveras Excel Programming 5 November 22nd 06 12:46 PM
import fixed width text file OE Excel Programming 1 June 20th 05 02:56 PM
Recording a macro to open a large fixed-width text file Lucie Harris Excel Programming 3 September 1st 04 02:23 AM
Import *.asc file into excel fixed width Hartsell Excel Programming 1 February 24th 04 08:15 AM


All times are GMT +1. The time now is 09:47 PM.

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

About Us

"It's about Microsoft Excel"