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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Macro to update data from excel file

Macro to update data from excel file

Scheduled Pinned Locked Moved Database
questiondatabaseannouncement
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.
  • P Offline
    P Offline
    PrasadD
    wrote on last edited by
    #1

    Hello All, I have some data in the Excel file, and i want to get it into sql table. How can i do that? Can i use macro ? if Yes than how should i use the macro? Thanking in advance. Prasad.

    X 1 Reply Last reply
    0
    • P PrasadD

      Hello All, I have some data in the Excel file, and i want to get it into sql table. How can i do that? Can i use macro ? if Yes than how should i use the macro? Thanking in advance. Prasad.

      X Offline
      X Offline
      xoph
      wrote on last edited by
      #2

      The easiest way to transfer data accross is to create a DTS package: start SQL Enterprise Manager, go to the Data Transformation Services node, right click on "Local Packages" and select "New package". By drag and drop, you can create 2 connections objects, 1 Excel object and 1 SQL Server object (you can create other types of connections as well, including ODBC, csv file, Oracle, Sybase, etc...) Then drag and drop a "Transform Data Task" object, set its source to Excel and its target to SQLServer. Right-click on the "Transform Data Task" object and select properties. You can configure how you want the data to be mapped, it even creates a table in SQL Server if you want. It is quite easy to use, virtually no code to write. Save your package, execute it and you're done. If you want to re-use this package it is quite handy. You can add all sorts of other tasks/macro that run before or after the data pump. You can also specify the order in which each step should be executed. :rolleyes:Chris

      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