Welcome to the new platform of Programmers Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use it's exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
Reading Data From a CSV or Flat File and Creating a Dataset
Hi, I am creating an application where i want to populate a dataset from a CSV file once i have clicked on a load button and chosen the location of the file!!
If i have a csv containing n columns and m rows. where the first row of the file contains the column headers.
How do i read it in so i can store it in a dataset. I then want to be able to:
- Display the dataset on a datatable;
- Perform a number of tasks on the data:
i.e. do i=1 to (number of rows);
Column_new=Column1 + Column2;
- output the results (column_new) into a new data table.
Each time a file is read in i want it to be able to hold different numbers of columns and rows!!
I am completely stuck any help would be really appreciated..