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. xml to excel Help!

xml to excel Help!

Scheduled Pinned Locked Moved Database
databasehelpsysadminwindows-adminsecurity
1 Posts 1 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
    michanne1
    wrote on last edited by
    #1

    I have an xml datastream and would like to know the syntax to map the contents to a specific excel worksheet and xml map. This is to automate 30+ complex reports in excel (must be excel - and no iis available to make my job much easier!). I anyone has a better solution I welcome it. This is my syntax so far: Dim objConn As ADODB.Connection Dim objCMD As ADODB.Command Dim objResultStream As ADODB.Stream Dim xmpCustomMap As XmlMap On Error GoTo Handle_Error Set xmpCustomMap = ActiveWorkbook.XmlMaps("triangle_Map") Set objConn = New ADODB.Connection objConn.Open "Provider=SQLOLEDB;server=mydb;Database=Development;" & _ "Integrated Security=SSPI" Set objCMD = New ADODB.Command Set objCMD.ActiveConnection = objConn 't-SQL DIALECT objCMD.Dialect = "{C8B522D7-5CF3-11CE-ADE5-00AA0044773D}" objCMD.CommandText = "Exec dbo.proc_xml 1394" objCMD.CommandType = adCmdText Set objResultStream = New ADODB.Stream objResultStream.Open objCMD.Properties("Output stream") = objResultStream objCMD.Properties("XML Root") = "Root" objCMD.Execute , , adExecuteStream Debug.Print objResultStream.ReadText(adReadAll)

    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