Results 1 to 1 of 1
  1. #1
    Join Date
    Feb 2002
    Posts
    1

    Post Unanswered: Recordset for PivotChache in Excel ?!

    hi!
    Iīve a problem generating a PivotTable in Excel from out of a Query in access. If a create a new Instance of Excel, a workbook an a Pivotcahe, I canīt create a PivotTable with data direct from Access! Funny is, that it works from out of Excel or over ODBC (but in this Case itīs not possible because the DB is opend exclusive)
    I tried erverthing, ADO, DAO, only connection for PivotCache......

    Can anyone Help me ?!!! I donīt know any further !!!!!
    THANKS !

    the code:
    Set objExcel = CreateObject("Excel.Application")
    Set wbkExcel = objExcel.Workbooks.Add

    Set rsTop10 = New ADODB.Recordset
    rsTop10.Open "qry_top10_stufe1", CurrentProject.Connection

    Set cachePivot = wbkExcel.pivotcaches.Add(2) 'xlExternal = 2
    'Hereīs the problem !
    Set cachePivot.Recordset = rsTop10
    Last edited by acroeper; 02-05-02 at 09:42.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •