View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default How do I import several csv files into one excel worksheet?

If you're merging CSV files and there are no CSV files in that folder, why would
you want to get around that check?



marksince1984 wrote:

There is a check in there that the folder contains csv files, it is this
i need to get around. Any ideas?

Dave Peterson Wrote:
Without any testing...

'Open the TXT file in Excel
Application.ScreenUpdating = False
Workbooks.OpenText Filename:=TXTFileName, Origin:=xlWindows, StartRow
_
:=1, DataType:=xlDelimited, TextQualifier:=xlDoubleQuote, _
ConsecutiveDelimiter:=False, Tab:=False, Semicolon:=False, Comma:=True,
_
Space:=False, Other:=False


becomes:

'Open the TXT file in Excel
Application.ScreenUpdating = False
Workbooks.OpenText Filename:=TXTFileName, Origin:=xlWindows, StartRow
_
:=1, DataType:=xlDelimited, TextQualifier:=xlDoubleQuote, _
ConsecutiveDelimiter:=False, Tab:=TRUE, Semicolon:=False, Comma:=FALSE,
_
Space:=False, Other:=False




--
marksince1984
------------------------------------------------------------------------
marksince1984's Profile: http://www.excelforum.com/member.php...o&userid=33484
View this thread: http://www.excelforum.com/showthread...hreadid=546042


--

Dave Peterson