Click to See Complete Forum and Search --> : Filling an Excel Page


October 29th, 1999, 03:22 AM
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

Lothar Haensler
October 29th, 1999, 03:30 AM
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.