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. Database & SysAdmin
  3. Database
  4. how to bulk insert into excel?

how to bulk insert into excel?

Scheduled Pinned Locked Moved Database
databasetutorialquestion
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.
  • S Offline
    S Offline
    steven_wong
    wrote on last edited by
    #1

    Hello: Now i want to bulk insert a dataset into an excel file, is there any good method?Thanks in advance! :rose: Plus: i am wodering the method of firstly store the datatable in sql sever,then use dts. but i think it seems a little redundant and time-wasting.

    S 1 Reply Last reply
    0
    • S steven_wong

      Hello: Now i want to bulk insert a dataset into an excel file, is there any good method?Thanks in advance! :rose: Plus: i am wodering the method of firstly store the datatable in sql sever,then use dts. but i think it seems a little redundant and time-wasting.

      S Offline
      S Offline
      S Douglas
      wrote on last edited by
      #2

      I don't know how do it from TSQL but here is how I have done it form C++

      CString str;
      str.Format("SELECT * INTO [Excel 8.0;DATABASE=%s].[%s] FROM [%s]", ExcelFile, Worksheet, Table);

      // pConn is a database connection

      pConn->Execute(str.AllocSysString(), NULL, adExecuteNoRecords);


      I'd love to help, but unfortunatley I have prior commitments monitoring the length of my grass. :Andrew Bleakley:

      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