CSV/Bytearray to Datatable

  • Thread starter Thread starter B-Dog
  • Start date Start date
B

B-Dog

I'm trying to download a csv file into a datatable but can't seem to figure
it out. I can read the csv into a bytearray and view it but I'm having
trouble trying to figure out get the downloaded file into a datatable
instead of saving the file to the hard drive then reading. I'd like to read
it straight into the datatable. Any suggestions? Thanks
 
That is, but is there a way to do it reading it straight from website using
a bytearray without having to download the file then read it. Right now I'm
using webclient to download into a byte array and can view the contents but
haven't found a way to get it into a dataset. This process is fast if I
could just figure out how to get it into a table.

ByteArray = W.DownloadData(URL)
ResponseString = System.Text.Encoding.ASCII.GetString(ByteArray)

which gives me something like this

ABC,ABC,123,456
ABC,DEF,234,234
ABE,SES,234,121
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top