CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2005
    Location
    Spain
    Posts
    34

    transfer xml data to excel

    hi,

    how to export XML data from a datagrid to excel sheet?thanks.
    Life is a foreign language; all men mispronounce it.

  2. #2
    Join Date
    Jul 2001
    Location
    Sunny South Africa
    Posts
    11,284

    Re: transfer xml data to excel

    Hello again MP!

    This link should help !

  3. #3
    Join Date
    Nov 2004
    Location
    LA. California Raiders #1 AKA: Gangsta Yoda™
    Posts
    616

    Re: transfer xml data to excel

    If you have your xml file already on your filesystem then you can just use the .OpenXML function when the user clicks on the Export button.

    Ha, saw you over at vb forums.

    Code:
    Dim moApp As Excel.Application = DirectCast(CreateObject("Excel.Application"), Excel.Application)
    
    '...
    Dim oWB As Excel.Workbook = moApp.Workbooks.OpenXML("C:\MyXML.xml")
    VB/Office Guru™ (AKA: Gangsta Yoda™)
    VB Forums - Super Moderator 2001-Present

    Microsoft MVP 2006-2011

    Please use [code]your code goes in here[/code] tags when posting code.

    Senior Software Engineer MCP, BSEE, CET
    VS 2012 Premium, VS 6.0 Enterprise SP6, VSTO, Office Ultimate 2010, Windows 7 Ultimate
    Star Wars Gangsta Rap SE Reputations & Rating Posts Office Primary Interop AssembliesAdvanced VB/Office Guru™ Word SpellChecker™.NETAdvanced VB/Office Guru™ Word SpellChecker™ VB6Outlook Global Address ListVB6/Crystal Report Ex.VB6/CR Print Setup Dialog Ex.

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured