0
private void readXLSData()
{
OleDbConnection con = new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\Users\nsharifzadeh\\Desktop\\Book1.xls;Extended Properties=""Excel 8.0;HDR=YES;""");
con.Open();
OleDbDataAdapter da = new OleDbDataAdapter("select * from [Sheet1$]", con);
DataSet ds = new DataSet();
da.Fill(ds);
}
나는 디버거를 사용하고,이 말을 다음 da.Fill(ds)
그것은 폭탄에 모든 방법을 작동하는 것 같군 :OleDbConnection 클래스 (또는 다른 것)를 사용하여 XLS 파일을 읽는 방법?
*The Microsoft Jet database engine could not find the object 'Sheet1$'. Make sure the object exists and that you spell its name and the path name correctly.*
내가 시트의 이름은 Sheet1의 맹세! 내가 여기서 잘못하고있는 것이 있습니까 ??
도움 주셔서 감사합니다. 당신이 시도 할 수
문제가되지해야합니까? (탭에) 하단에, 그것은 워크 시트입니까, 아니면 이름을 변경 했습니까? – Derek