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

    Filling an Excel Page

    I've got a program that exports cell by cell from a MSFlexGrid to an excel worksheet, using the code:


    With MSFViewer
    for mRow = 0 to .Rows - 1
    for mcol = 0 to .Cols - 1
    mXcol = Chr(65 + mcol)
    mExcel.Application.ActiveWorkbook.Worksheets.Application.ActiveCell(mRow + 1, mXcol) = .TextMatrix(mRow, mcol)
    next
    next
    End With




    This works fine but is very slow.

    Is there a way of cutting and pasting the whole grid directly into excel?
    Thanks

    James


  2. #2
    Join Date
    May 1999
    Posts
    3,332

    Re: Filling an Excel Page

    I'd try the Clip property of the Grid, select all rows and columns first and then copy and paste the whole contents of the clip property via the Clipboard to Excel.


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