CodePudding user response:
http://download.csdn.net/detail/WallesCai/369462CodePudding user response:
Actually the Excel data imported into the VB data showed that the control is very simple, but you must know ADO object or ADO control operation, only four of five line to solve the problem,Here will give you a 2003 examples of Excel import VB MSHFlexGrid1 controls, for your reference:
MSHFlexGrid1. Clear
Adodc1. The ConnectionString="Provider=Microsoft. Jet. The OLEDB. 4.0; Persist Security Info=false; Data Source="& amp; App. The Path & amp; "\ transcript. XLS; Extended Properties='Excel 8.0; HDR=Yes' "' connection Excel table
Adodc1. RecordSource="Select * FROM [Sheet1 $]" 'open Sheet1 form
Adodc1. Refresh
Set MSHFlexGrid1.=Adodc1 'DataSource import MSHFlexGrid1 control
This is a running
CodePudding user response:
Create Excel Application object, and then open the document, take various properties,