CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: export to excel

  1. #1
    Join Date
    Oct 2004
    Posts
    55

    export to excel

    hi,

    i have 3 grids displayed side by side holiding details.this i need to export to excel sheet.

    If i am using RenderControl(htmlWrite) i am able to export to excel sheet but the three grids are being displayed one below other, but i require it to be showed side by side




    By using div tag and using innerHtml i am able to print these details in new window.By using this info can i export the data to Excel sheet.


    my question is using innerhtml can i export data with in div tag to excel sheet.if so pl. help me out in giving sample.


    Thanks in advance
    karuna

  2. #2
    Join Date
    Feb 2001
    Location
    Sydney, Australia
    Posts
    1,909

    Re: export to excel

    The simplest solution in your case is to create a CSV (comma separated values) file and feed this file to MS Excel.

    So the problem comes down to creation of the CSV file. Iterate thru columns and rows of the grid and put cell values (separating them by commas) into CSV files - one line in the CSV file for each row in the grid.

    After CSV file is created open it using MS Excel.


    Quote Originally Posted by btkaruna
    hi,

    i have 3 grids displayed side by side holiding details.this i need to export to excel sheet.

    If i am using RenderControl(htmlWrite) i am able to export to excel sheet but the three grids are being displayed one below other, but i require it to be showed side by side




    By using div tag and using innerHtml i am able to print these details in new window.By using this info can i export the data to Excel sheet.


    my question is using innerhtml can i export data with in div tag to excel sheet.if so pl. help me out in giving sample.


    Thanks in advance
    karuna
    Best regards,
    Igor Sukhov

    www.sukhov.net

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