Help - Covert data from MSFlexgrid to excel in VB6.0
-
Hi friends, In my application I am converting data from msflexgrid to rxcel by using the following code. Clipboard.Clear 'Clear the Clipboard With MSFlexGrid1 'Select Full Contents (You could also select partial content) .Col = 0 'From first column .Row = 0 'From first Row (header) .ColSel = .Cols - 1 'Select all columns .RowSel = .Rows - 1 'Select all rows Clipboard.SetText .Clip 'Send to Clipboard End With With xlApp.ActiveWorkbook.ActiveSheet .Range("C5").Select 'Select Cell A1 (will paste from here, to different cells) .Paste 'Paste clipboard contents End With ' This makes Excel visible xlApp.Visible = True But when the data is pasted in Excel sheet, there is some cells pasted wrongly it means some row is splited in two rows. Totally i have 11 columns, and no of rows will depends. for some row the last 3 column values are pasted in the next row 2,3,4 columns.The next rows is proceeding at next line from that row. Please can anyone help me out. Its very very urgent for me. Expecting your help. Thanks and Regards,