Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2000 > SQL Server 2000
Password Reminder
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old June 21st, 2007, 05:58 PM
Registered User
Join Date: May 2005
Location: , , .
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to chocobabe100 Send a message via Yahoo to chocobabe100
Default Imorting .csv into excel

Hi i want to import a csv file into excel . the file is imported but it does not put the comma separated values in different columns . Any help would b appreciated :) heres my code
                Excel.Application xlAppl;
            Excel._Workbook xlWB;
            Excel._Worksheet xlSheet;
            Excel.Range oRng;

                xlAppl = new Excel.Application();
                xlAppl.Visible = true;

                xlWB = (Excel._Workbook)(xlAppl.Workbooks.Add(Missing));
                xlSheet = (Excel._Worksheet)xlWB.ActiveSheet;

            //Add table headers going cell by cell.
                 xlAppl.Workbooks.Open(@"d:\csvtest.csv",false,fals e,5,"","",true,Excel.XlPlatform.xlWindows," ",true,false,null,false,null,false);

Reply With Quote
  #2 (permalink)  
Old August 18th, 2007, 05:48 PM
Friend of Wrox
Join Date: May 2006
Location: Helsingborg, , Sweden.
Posts: 246
Thanks: 0
Thanked 0 Times in 0 Posts

Are the commas present in the file?
Are there CRLF in the file?

Reply With Quote
  #3 (permalink)  
Old August 18th, 2007, 09:25 PM
Friend of Wrox
Points: 1,536, Level: 15
Points: 1,536, Level: 15 Points: 1,536, Level: 15 Points: 1,536, Level: 15
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Oct 2006
Location: , MI, USA.
Posts: 475
Thanks: 0
Thanked 9 Times in 9 Posts

Please post the first 6 and the last 6 lines of the text file.

--Jeff Moden
Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Export ALL records from GridView into Excel or CSV kevorkian ASP.NET 2.0 Basics 7 June 17th, 2008 01:28 PM
Increase width for Excel and CSV reports diptypatil J2EE 0 October 23rd, 2007 06:36 AM
Change excel into csv format Ivanchan Excel VBA 4 July 5th, 2007 02:02 AM
Excel Vs CSV file - import performance itHighway Classic ASP Databases 0 August 5th, 2006 03:40 PM
CSV and Excel sheet import itHighway Classic ASP Professional 0 August 5th, 2006 08:25 AM

All times are GMT -4. The time now is 04:23 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.