DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2007
    Posts
    11

    Excel Pivot table from vb .net

    I need to set the source data of a Pivot Table in vb .net.

    Can I use a DataTable to do it?

    Code:
    DT As DataTable
    ...
    xlApp = New Excel.Application
    xlWorkBook = xlApp.Workbooks.Open(sPath)
    xlApp.Workbooks(1).PivotCaches(1).SourceData = DT

  2. #2
    Join Date
    Apr 2007
    Location
    Sterling Heights, Michigan
    Posts
    8,649
    See if you can tweak this example to suit your needs.
    I don't answer coding questions via PM or Email. Please post a thread in the appropriate forum section.
    Please use [Code]your code goes in here[/Code] tags when posting code.
    Before posting your question, did you look here?
    Got a question on Linux? Visit our Linux sister site.
    Modifications Required For VB6 Apps To Work On Vista

Similar Threads

  1. Newbie: Exporting Database to Excel from VB
    By Magic in forum VB Classic
    Replies: 26
    Last Post: 12-15-2005, 10:53 AM
  2. Replies: 0
    Last Post: 05-30-2002, 03:07 PM
  3. Delete & Copy Access table thru VB
    By Sinni in forum VB Classic
    Replies: 0
    Last Post: 05-29-2002, 04:01 PM
  4. Can't Using IIS Admin object in VB .NET
    By Patrick in forum .NET
    Replies: 0
    Last Post: 05-20-2002, 08:28 AM
  5. Clearing Pivot table fields "memory" in VB?
    By Fred Giesen in forum authorevents.patrick
    Replies: 2
    Last Post: 09-06-2000, 05:17 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links