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. Loading a Data file into DB using Asp.net

Loading a Data file into DB using Asp.net

Scheduled Pinned Locked Moved ASP.NET
databasecsharpasp-netsql-serversysadmin
3 Posts 3 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.
  • M Offline
    M Offline
    macca24
    wrote on last edited by
    #1

    I have a system which has an asp.net front end and a SQL Server DB. I get a file in the form of an excel spreadsheet every few weeks that contains a number of fields. I want to load it into the DB and the appropriate fields in the excel spreadsheet would go into the corresponding field in the DB tables. Anyone know how to do this?

    Richard DeemingR Z 2 Replies Last reply
    0
    • M macca24

      I have a system which has an asp.net front end and a SQL Server DB. I get a file in the form of an excel spreadsheet every few weeks that contains a number of fields. I want to load it into the DB and the appropriate fields in the excel spreadsheet would go into the corresponding field in the DB tables. Anyone know how to do this?

      Richard DeemingR Offline
      Richard DeemingR Offline
      Richard Deeming
      wrote on last edited by
      #2

      Try one of the following libraries:

      • ExcelDataReader[^];
      • EPPlus[^];
      • ClosedXML[^];
      • The OpenXML SDK[^];

      Avoid "office interop" at all costs:

      Considerations for server-side Automation of Office[^]

      Microsoft does not currently recommend, and does not support, Automation of Microsoft Office applications from any unattended, non-interactive client application or component (including ASP, ASP.NET, DCOM, and NT Services), because Office may exhibit unstable behavior and/or deadlock when Office is run in this environment.


      "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

      "These people looked deep within my soul and assigned me a number based on the order in which I joined" - Homer

      1 Reply Last reply
      0
      • M macca24

        I have a system which has an asp.net front end and a SQL Server DB. I get a file in the form of an excel spreadsheet every few weeks that contains a number of fields. I want to load it into the DB and the appropriate fields in the excel spreadsheet would go into the corresponding field in the DB tables. Anyone know how to do this?

        Z Offline
        Z Offline
        ZurdoDev
        wrote on last edited by
        #3

        You could also use SSIS or even create a job to do the work and schedule it in SQL.

        There are only 10 types of people in the world, those who understand binary and those who don't.

        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