View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
jatman jatman is offline
external usenet poster
 
Posts: 88
Default import flat file

i have recorded the following macro:

Workbooks.OpenText Filename:="C:\Users\jat\Desktop\23-32237", Origin:=
xlWindows, StartRow:=1, DataType:=xlFixedWidth, FieldInfo:=Array(Array(0,
1), Array(14, 1), Array(39, 9), Array(48, 1), Array(54, 1), Array(60, 1),
Array(72, 1), Array(85, 1), Array(93, 1), Array(100, 1)),
TrailingMinusNumbers:=True

it opens the file 23-32237, and i have it inserting the width of each
column, but i have to manually delete some also. example Array(39, 9)
deletes the "preset" that windows recognizes based on some criteria, and
Array (48, 1) adds one based on what i want.

how do you delete all presets that windows puts in automatically?

thank you,
jat