Hi there,
I need help processing data from Excel in VB. I have a MSHFlexgrid to show data extracted from Excel. I'm able to show a range of cells from Excel table to my Flexgrid, but that's it. The problem is, I can't filter the data I wanted to show from Excel table. Is it possible to filter Excel data using SQL command? I've tried several ways including SQL command like "select Name from tbcustomers where Name....."
Please help me, anyone.
This is the code i've made so far:
Thank you very much!
Nairda
I need help processing data from Excel in VB. I have a MSHFlexgrid to show data extracted from Excel. I'm able to show a range of cells from Excel table to my Flexgrid, but that's it. The problem is, I can't filter the data I wanted to show from Excel table. Is it possible to filter Excel data using SQL command? I've tried several ways including SQL command like "select Name from tbcustomers where Name....."
Please help me, anyone.
This is the code i've made so far:
Code:
Private Sub CmdShow_Click() Dim xlapp As Excel.Application Dim xlbook As Excel.Workbook Set xlapp = New Excel.Application Set xlbook = xlapp.Workbooks.Add Clipboard.Clear With MSHFlexGrid1 .Col = 0 .Row = 0 .ColSel = .Cols - 1 .RowSel = .Rows - 1 Clipboard.SetText .Clip End With With xlapp.ActiveWorkbook.ActiveSheet .Range("A1:R8000").Select .Paste End With xlapp.Visible = True End End Sub
Nairda
Comment