Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

ASP.NET Forum


You are currently viewing our ASP.NET Forum as a guest. Please register to participate.
Login



Reply
Problem importing data from CSV
Old 09-14-2010, 05:24 AM Problem importing data from CSV
itHighway's Avatar
Skilled Talker

Posts: 83
Name: Zeeshan Dar
Location: GUJ
Trades: 0
I have a CSV file with a column containing both Numeric and Text data. Using ASP code when I import the data from that column I only get Numeric data not Text.

Below is the example of data
Quote:
CODE:
499
549
234

A23
T33
YY2

I tried to convert CSV column to text but it did not work.

Please advice.


Thank you,
__________________
Zeeshan Dar
itHighway -
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
itHighway is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 09-18-2010, 05:45 PM Re: Problem importing data from CSV
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,336
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
And how is the CSV file formated?
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 09-18-2010, 07:49 PM Re: Problem importing data from CSV
dreamconception's Avatar
Average Talker

Posts: 26
Name: Dan
Trades: 0
Hmm, CSV is just formatted with commas? I know there is a few differences, but really the scheme is same way. I have created this for PHP to support all the ways of formatting CSV, but in reality it is very, very few differences.

Remember for data they have to be enclosed ("DATA").
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
dreamconception is offline
Reply With Quote
View Public Profile Visit dreamconception's homepage!
 
Old 09-18-2010, 09:18 PM Re: Problem importing data from CSV
Ultra Talker

Posts: 366
Name: Steve
Location: Miami, FL, Earth
Trades: 0
post the csv file and code snippet that's parsing it... can't help much without those.
__________________
- Steve

President,
Please login or register to view this content. Registration is FREE
smoseley is offline
Reply With Quote
View Public Profile Visit smoseley's homepage!
 
Old 10-14-2010, 03:44 PM Re: Problem importing data from CSV
Junior Talker

Posts: 1
Name: LiamGarcia
Trades: 0
This is my code, hope to help you
PHP Code:
public DataSet GetDataSet(string filename )
     {
        
string connString =string.Format("Provider=Microsoft.Jet.OLEDB.4.0;Data Source={0};Extended Properties=Text;",Path.GetDirectoryNamefilename ) );

        
string cmdString =string.Format"SELECT * FROM {0}"Path.GetFileNamefilename ) );
       
          
OleDbDataAdapter dataAdapter = new OleDbDataAdapter(cmdStringconnString);

            
DataSet dataSet = new DataSet();

            
dataAdapter.Fill(dataSet);

            return 
dataSet;
    } 
__________________

Please login or register to view this content. Registration is FREE
LiamGarcia186 is offline
Reply With Quote
View Public Profile Visit LiamGarcia186's homepage!
 
Old 10-24-2010, 08:05 AM Re: Problem importing data from CSV
Extreme Talker

Posts: 206
Name: vikas
Trades: 0
not sure but csv file format is itself a text .. its a comma seperated text file. And still if its different version of csv type you just have to convert it there are lots of tool to convert it you dont have to write the program everytime
__________________

Please login or register to view this content. Registration is FREE
Collection of free online books and free ebooks
Please login or register to view this content. Registration is FREE
- Free online pdf books and free pdf eBooks
vikas1234 is offline
Reply With Quote
View Public Profile
 
Old 10-28-2010, 04:16 AM Re: Problem importing data from CSV
Junior Talker

Posts: 1
Trades: 0
CSV is just formatted with commas? I know there is a few differences, but really the scheme is same way.






School Community | School Ranking
astle35 is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Problem importing data from CSV
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.50669 seconds with 12 queries