Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. DataGridView from CSV file BUT WITHOUT OleDb

DataGridView from CSV file BUT WITHOUT OleDb

Scheduled Pinned Locked Moved C#
question
5 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Offline
    I Offline
    Idoshhh
    wrote on last edited by
    #1

    is there any way to import CSV file to datagridview without all the procedure of connectionstrings and querys????? i want only to imports the parameters of the CSV to the table..... 10x... Ido

    C M G 3 Replies Last reply
    0
    • I Idoshhh

      is there any way to import CSV file to datagridview without all the procedure of connectionstrings and querys????? i want only to imports the parameters of the CSV to the table..... 10x... Ido

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      You can read a CSV into memory as a string array using File.ReadAllLines and use the split method to split on the comma to get your fields.

      Christian Graus Driven to the arms of OSX by Vista. "I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )

      1 Reply Last reply
      0
      • I Idoshhh

        is there any way to import CSV file to datagridview without all the procedure of connectionstrings and querys????? i want only to imports the parameters of the CSV to the table..... 10x... Ido

        M Offline
        M Offline
        Mycroft Holmes
        wrote on last edited by
        #3

        I love it when I can do this - CSVtoTable[^]

        Never underestimate the power of human stupidity RAH

        I 1 Reply Last reply
        0
        • M Mycroft Holmes

          I love it when I can do this - CSVtoTable[^]

          Never underestimate the power of human stupidity RAH

          I Offline
          I Offline
          Idoshhh
          wrote on last edited by
          #4

          Great! lovely :-) 10x!!!!

          1 Reply Last reply
          0
          • I Idoshhh

            is there any way to import CSV file to datagridview without all the procedure of connectionstrings and querys????? i want only to imports the parameters of the CSV to the table..... 10x... Ido

            G Offline
            G Offline
            Giorgi Dalakishvili
            wrote on last edited by
            #5

            Here is a library for you: FileHelpers v2.0 - Delimited (CSV) or Fixed Data Import/Export Framework[^]

            Giorgi Dalakishvili #region signature My Articles Asynchronous Registry Notification Using Strongly-typed WMI Classes in .NET [^] My blog #endregion

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups