csv manipulation with vb.net

  • Thread starter Thread starter Keith A. Lees
  • Start date Start date
K

Keith A. Lees

Hi All,

I have an issue with some Excel spreadsheets which i need to take the
data that is in them and re-arange it into a useful (to our management
system) format.

I would like to write an application whereby i can select a file
through a dialog box, manipulate the data, and output to csv in the
new format.

Can anyone point me to a good resource or tutorials on this subject?

MTIA

Keith
 
Hi Keith,

In my opinion it is in the net the most simple to read the excel data in a
dataset do some operations and than writing it using the streamwriter to
csv.

The only difficult thing for it is the connection string and that is here

www.connectionstrings.com
Use that to make a connection.

Create a new datast
Create a new dataadapter with the connection string and a select like this
"Select * from [sheet1$]"
fill the dataset using the adapter
And you are almost there.

For writing the CSV file you can just use the streamwritter while looping
through the dataset.

I hope this helps?


Cor
 
Back
Top