我必须使用OleDbConnection创建一个新的excel文件,但当我用这个字符串打开连接时:
OleDbConnection excelConnection =
new OleDbConnection(
String.Format(
@"Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0};Mode=ReadWrite;Extended Properties=""Excel 12.0;HDR=YES"";",
excelFile));
我收到一个错误,在英语中听起来像“外表不是预期的格式。”
但文件是新的,空的......我怎么办?