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. Web Development
  3. ASP.NET
  4. Importing

Importing

Scheduled Pinned Locked Moved ASP.NET
csharpasp-netdatabasehelptutorial
4 Posts 2 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.
  • A Offline
    A Offline
    A kamath
    wrote on last edited by
    #1

    I want to import excel sheet into my database. Can anybody help me to find any article or books to find how to do this(asp.net/c#).

    S 1 Reply Last reply
    0
    • A A kamath

      I want to import excel sheet into my database. Can anybody help me to find any article or books to find how to do this(asp.net/c#).

      S Offline
      S Offline
      Sylvester george
      wrote on last edited by
      #2

      Open enetrprise SQL Server Select the database Select Tables, Right Click , select All tasks, select Import Data Click Next Choose Microsoft Excel 97-2000 Browse the file to import click Next Choose the destination Database clcik Next Click Next Select the Sheet name and the table name you want to import click Next

      Regards, Sylvester G sylvester_g_m@yahoo.com

      A 1 Reply Last reply
      0
      • S Sylvester george

        Open enetrprise SQL Server Select the database Select Tables, Right Click , select All tasks, select Import Data Click Next Choose Microsoft Excel 97-2000 Browse the file to import click Next Choose the destination Database clcik Next Click Next Select the Sheet name and the table name you want to import click Next

        Regards, Sylvester G sylvester_g_m@yahoo.com

        A Offline
        A Offline
        A kamath
        wrote on last edited by
        #3

        Thanks, But I am using Firebird as the database.

        S 1 Reply Last reply
        0
        • A A kamath

          Thanks, But I am using Firebird as the database.

          S Offline
          S Offline
          Sylvester george
          wrote on last edited by
          #4

          Try this way.. private void GetData() { try { if(FileName.Text.EndsWith("xls")) { string connection = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="+ FileName.Text + ";Extended Properties=Excel 8.0;"; DataSet bulkData=new DataSet() ; OleDbDataAdapter adap = new OleDbDataAdapter("SELECT [Postal/Kommune], HouseType, KommuneNumber, PostalCode, StreetCode, HouseNumber, Floor, SideDoorNumber FROM [" + SheetName.Text + "$]", connection); adap.Fill(bulkData); if(bulkData!=null) if(bulkData.Tables[0].Rows.Count>0) { BulkPropertyBLL bulkpropertyBll = new BulkPropertyBLL(); for(int i=0;i Regards, Sylvester G sylvester_g_m@yahoo.com

          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