VC ++ with Excel

xiaoxiao2021-03-06  41

------------------------------ Bool Cadoconnection :: ConnecTexcel (CSTRING DBPATH, Long LOPTIONS) {CSTRING STRCONNECT = _T (" Driver = {Microsoft Excel Driver (* .xls)}; driverid = 790; dbq = ") DBPATH _T ("; hdr = yes; defaultdir =; readonly = false "); return open (lpctstr (strconnect), loptions ); The function on the top is to open an Excel connection

Then, you can operate with SQL statement

Import, you can read a record, then insert it with Insert Into, the loop operation is exported, too. -------------------------------------------------- -------------------------------------------------- -----------------------

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

New Post(0)