Home |
Search |
Today's Posts |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
HiJames,
A bit late perhaps, but I found this thread only today. Why would you want to push the recordset into Excel using XML? Do you know you can use the CopyFromRecordset method to write a recordset to Excel in one go? Example (oADOConn is an object variable that holds the connection to the database): sSQL = "SELECT * FROM Table" oRS.Open sSQL, oADOconn For Each oFld In oRS.Fields lCount = lCount + 1 oSh.Cells(1, lCount).Value = oFld.Name Next If Not oRS.EOF Then oSh.Range("A2").CopyFromRecordset oRS End If oRS.Close Set oRS = Nothing |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Protecting a range or cell in a worksheet Excel 2007 | Excel Programming | |||
Excel 2007 - referencing a cell value from another worksheet withi | Excel Discussion (Misc queries) | |||
Recordset from excel worksheet | Excel Programming | |||
Repost! Excel multiple worksheet populate from recordset | Excel Programming | |||
Help! Excel multiple worksheet populate from recordset | Excel Programming |