Home > Software engineering >  How will the contents of the EXCEL spreadsheet import VB in the table?
How will the contents of the EXCEL spreadsheet import VB in the table?

Time:09-24

I am a beginner, think of the content of the EXCEL spreadsheet import VB form, and then extracted from the VB form to the program, or use the program to modify the VB forms, is now the most basic is how to set the contents of the EXCEL spreadsheet import VB table, gift guide, please!!!!!!

CodePudding user response:

http://download.csdn.net/detail/WallesCai/369462

CodePudding 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,
  • Related