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. Import ExelSheetData into SqlServer2005 Table

Import ExelSheetData into SqlServer2005 Table

Scheduled Pinned Locked Moved ASP.NET
csharpasp-net
2 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.
  • L Offline
    L Offline
    lrsalunkhe
    wrote on last edited by
    #1

    Respected How we Import ExcelSheetData into SqlServer2005 Table,by using Asp.net with C# . Thanks.

    M 1 Reply Last reply
    0
    • L lrsalunkhe

      Respected How we Import ExcelSheetData into SqlServer2005 Table,by using Asp.net with C# . Thanks.

      M Offline
      M Offline
      Morgs Morgan
      wrote on last edited by
      #2

      Rather convert your file into .csv(comma delimeted file) and use bulk insert like:

      USE your_database_name
      Go

      BULK INSERT [your_table_name]
      FROM 'C:\FolderName\FileName.csv'
      WITH
      (
      FIELDTERMINATOR=',',--this means that your fields(columns) are separated by commas
      ROWTERMINATOR = '\n'--and it says that new line is a row terminator
      )
      GO

      From Excel, go File > Save As > Save As file type, look for csv Good luck.

      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