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. excel

excel

Scheduled Pinned Locked Moved C#
csharp
8 Posts 6 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.
  • T Offline
    T Offline
    TAREQ F ABUZUHRI
    wrote on last edited by
    #1

    how can read information within excel file from C# application

    Palestine

    N V G B L 5 Replies Last reply
    0
    • T TAREQ F ABUZUHRI

      how can read information within excel file from C# application

      Palestine

      N Offline
      N Offline
      Nisar Inamdar
      wrote on last edited by
      #2

      :cool:What u mean.....? Describe little more... So i can help u? Nisar Inamdar. Always for u...

      T 1 Reply Last reply
      0
      • T TAREQ F ABUZUHRI

        how can read information within excel file from C# application

        Palestine

        V Offline
        V Offline
        Vasudevan Deepak Kumar
        wrote on last edited by
        #3

        Excel ODBC Driver http://www.codeproject.com/database/excel_odbc.asp[^]

        Vasudevan Deepak Kumar Personal Homepage Tech Gossips

        1 Reply Last reply
        0
        • T TAREQ F ABUZUHRI

          how can read information within excel file from C# application

          Palestine

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

          You can use the OleDb Managed Data Provider to read an Excel Spreadsheet using ADO.NET and C#

          #region signature my articles #endregion

          1 Reply Last reply
          0
          • N Nisar Inamdar

            :cool:What u mean.....? Describe little more... So i can help u? Nisar Inamdar. Always for u...

            T Offline
            T Offline
            TAREQ F ABUZUHRI
            wrote on last edited by
            #5

            see this excel file http://paltareq.brinkster.net/down/complete\_apps\_rep.xls in my c# application i want to make for loop to read each cell in the file ?

            Palestine

            1 Reply Last reply
            0
            • T TAREQ F ABUZUHRI

              how can read information within excel file from C# application

              Palestine

              B Offline
              B Offline
              Bhavesh Bagadiya
              wrote on last edited by
              #6

              You can use InterOp service provided by Microsoft using Excel namespace. namespace for Excel is, Microsoft.Office.Interop.Excel

              L 1 Reply Last reply
              0
              • T TAREQ F ABUZUHRI

                how can read information within excel file from C# application

                Palestine

                L Offline
                L Offline
                laddie 0
                wrote on last edited by
                #7

                TAREQ Try this using System.Data.OleDb; using System.Data; . . //I am not sure giving url in the filename will work.Please check it OleDbConnection oleConnection = new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source="+fileName+@";Extended Properties=""Excel 8.0;HDR=YES"""); oleConenction.Open(); OleDbCommand cmd= new OleDbCommand("select * from [Sheet1$]",oleConnection); OleDbDataReader read = cmd.ExecuteReader(); while(read.Read()) { Console.WriteLine(read[0]+......); } Please let me know if it helps Laddie }

                1 Reply Last reply
                0
                • B Bhavesh Bagadiya

                  You can use InterOp service provided by Microsoft using Excel namespace. namespace for Excel is, Microsoft.Office.Interop.Excel

                  L Offline
                  L Offline
                  laddie 0
                  wrote on last edited by
                  #8

                  Hi Bhavesh, Just a gentle suggestion. This solution needs that you either assumes Office to be installed in the machine or you have to distubute the office libraries along with the Apps. Please find my last post for this question it sould provide a better and faster solution. laddie

                  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