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: 2
Default Workbooks.OpenText StartRow:=2 Not Skipping Row 1

The following macro imports the .csv file starting at row 1 of the file:

Sub OpenCSV()
Workbooks.OpenText Filename:="C:\Categories.csv", StartRow:=2,
DataType:=xlDelimited, Origin:=437, _
TextQualifier:=xlDoubleQuote, _
ConsecutiveDelimiter:=False, Semicolon:=False, Comma:=True

ActiveWorkbook.Activate
ActiveWindow.Visible = True
End Sub

Where Categories.csv contains:

CategoryID,CategoryName,Description
CategoryID,CategoryName,Description
1,Beverages,"Soft drinks, coffees, teas, beers, and ales"
2,Condiments,"Sweet and savory sauces, relishes, spreads, and seasonings"
3,Confections,"Desserts, candies, and sweet breads"
4,Dairy Products,Cheeses
5,Grains/Cereals,"Breads, crackers, pasta, and cereal"
6,Meat/Poultry,Prepared meats
7,Produce,Dried fruit and bean curd
8,Seafood,Seaweed and fish


Please help me understand why this happens (Excel 2003).
--
John Saunders
johnwsaunders at hotmail.com

 
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
Workbooks.OpenText does not work on XP. HELP !!! [email protected] Excel Programming 6 May 31st 05 03:18 PM
How to open UTF-8 files with Workbooks.OpenText Mete Kural Excel Programming 0 May 7th 05 01:25 AM
After OpenText all pastes from external apps use format from OpenText Jim[_31_] Excel Programming 1 November 8th 03 02:17 AM
Workbooks.OpenText Alistair Eberst Excel Programming 2 October 21st 03 12:50 PM
Using Workbooks.OpenText to read a tab-delimited file into a worksheet Dan E[_2_] Excel Programming 0 August 19th 03 08:02 PM


All times are GMT +1. The time now is 07:35 AM.

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"