草庐IT

strConnectionString

全部标签

c# - 在 C# 中从 XLSX 中读取数据

我是c#的新手,正在尝试使用以下代码在c#中读取XLSX文件:stringConnection="Provider=Microsoft.ACE.OLEDB.12.0;DataSource=c:\\Temp\\source.xlsx;ExtendedProperties=\"Excel12.0;HDR=Yes;IMEX=1\";";//codetoreadthecontentofformatfileOleDbConnectioncon=newOleDbConnection(Connection);OleDbCommandcommand=newOleDbCommand();DataTabl