tags:

views:

151

answers:

1

Using CDaoDatabase defined in afxdao.h, how can I open up Excel 2007 (xlsx) files? I can open up Excel 2003 (xls) files using the connection string Excel 8.0;HDR=NO;IMEX=1, anybody know how I can do this?

Thanks!

A: 

You need to use Microsoft.ACE.OLEDB.12.0 as the provider. Not sure if DAO supports that. MFC's DAO classes are deprecated.

Sheng Jiang 蒋晟