Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 122
Default Opening CSV in excel from VB

How about importing the data into a new worksheet? Then you'll be in
control of how EXCEL interprets the file, even if the file does have
the CSV extension. For example, something like:

Workbooks.Add
With ActiveSheet.QueryTables.Add(Connection:= _
"TEXT;C:\Documents and Settings\Administrator\My Documents\My
Spreadsheets\Temp\Test.csv" _
, Destination:=Range("A1"))
.AdjustColumnWidth = True
.TextFileParseType = xlDelimited
.TextFileSemicolonDelimiter = True
.Refresh BackgroundQuery:=False
End With

Reply
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
How do I stop blank workbook from opening when opening an existing kjg Excel Discussion (Misc queries) 3 February 12th 10 09:36 PM
Opening files in Excel 2003 saved in Excel 2000 without data loss... [email protected] Excel Discussion (Misc queries) 0 January 29th 07 07:19 PM
Trouble opening large size Excel file 155Mb in Excel 2007 pl2c Excel Discussion (Misc queries) 2 July 14th 06 11:45 PM
REF errors when opening excel in xp. works fine when opening wor. br Excel Discussion (Misc queries) 6 September 13th 05 11:41 AM
excel VBA problem - setting workbook as variable & opening/re-opening safe Excel Programming 1 August 20th 04 12:22 AM


All times are GMT +1. The time now is 09:27 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"