View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
ross ross is offline
external usenet poster
 
Posts: 81
Default Having trouble importing CSV files with a macro

Liam

I am using this to import a tabed file in to excel (windows)

Workbooks.OpenText FileName:= _
strfilename, Origin:=xlWindows, _
StartRow:=1, DataType:=xlDelimited,
TextQualifier:=xlDoubleQuote, _
ConsecutiveDelimiter:=False, Tab:=True, Semicolon:=True,
Comma:=False, _
Space:=False, Other:=False, FieldInfo:=Array(Array(1, 1),
Array(2, 1), Array( _
3, 1), Array(4, 1), Array(5, 1), Array(6, 1), Array(7, 1),
Array(8, 1))

Do not know about a mac system, buy look at the DataType, which can be
set to Mac, and the TextQulifier, ie xlcomma,

It might be easyiest to import one by hand and recored the output
using the macro recorder

Good luck
Ross