Access the Excel file with adotable

zhaozj2021-02-17  55

1, add ADOTable1 control, set the following properties: ConnectionString = "Provider = Microsoft.Jet.OLEDB.4.0; Extended Properties = Excel 8.0; Persist Security Info = false; Data Source = c: /abc.xls"; TableDirect = true; Tablename = "sheet1"; active = true; 2, add a DataSource1 control, set the following properties: DataSet = adotable1 3, add the DBGRID1 control, set the following properties: DataSource = DataSource1 At this time you can access the Excel file.

------------

C Builder [Technical Forum] - Http://webplay.myrice.com

转载请注明原文地址:https://www.9cbs.com/read-30536.html

New Post(0)