S
Scott Lyon
Is there an easy way to import the contents of a CSV text file into a
Dataset, preferably using VB.NET (2005)?
Here's the clincher - I cannot use code I already found out there that
simply splits the lines based on commas in each line, as there are cases
where there may be a comma within a string (surrounded by quotes), and I
don't want to split on that.
Here's the first few rows of the data to give you an idea:
"Subscriber Number","Statement Date","Charge Type","Charge
Description","Amount"
"555-555-5555","02/11/2008","LOCAL AIRTIME, LONG DISTANCE and INTERNATIONAL
CHARGES","","$0.00"
"555-555-5555","02/11/2008","Taxes","","$8.60"
"555-555-5555","02/11/2008","WorldClass Int'l Rate","General","$0.00"
"555-555-5555","02/11/2008","BB BIS&BES AddOn","CUSTOM DATA PACKAGE","$(3.60)"
I also am not having any luck with the OLEDB examples out there too, as my
filename could have spaces in it (for example the current one is "Statement
Detail.csv"), and trying to do a "select * from Statement Detail.csv fails
every time.
Any ideas/suggestions?
Dataset, preferably using VB.NET (2005)?
Here's the clincher - I cannot use code I already found out there that
simply splits the lines based on commas in each line, as there are cases
where there may be a comma within a string (surrounded by quotes), and I
don't want to split on that.
Here's the first few rows of the data to give you an idea:
"Subscriber Number","Statement Date","Charge Type","Charge
Description","Amount"
"555-555-5555","02/11/2008","LOCAL AIRTIME, LONG DISTANCE and INTERNATIONAL
CHARGES","","$0.00"
"555-555-5555","02/11/2008","Taxes","","$8.60"
"555-555-5555","02/11/2008","WorldClass Int'l Rate","General","$0.00"
"555-555-5555","02/11/2008","BB BIS&BES AddOn","CUSTOM DATA PACKAGE","$(3.60)"
I also am not having any luck with the OLEDB examples out there too, as my
filename could have spaces in it (for example the current one is "Statement
Detail.csv"), and trying to do a "select * from Statement Detail.csv fails
every time.
Any ideas/suggestions?