Retrieving values of the first column from Excel sheet (file with .xlsm extension) with OleDB
问题 I am trying to retrieve values of the first column from the Excel sheet called "SP$". I have the path: string path = @"C:\Users\atsurkanu\Desktop" + @"\TemplateClientExtraction_IDEAFIMIT_Conero_QUARTER_20170127.xlsm"; string connectionString = string.Format(@"provider=Microsoft.ACE.OLEDB.12.0;data source={0};Extended Properties=Excel 12.0;", path); string sheetName = "SP$"; and some code like this one: using (OleDbConnection con = new OleDbConnection(connectionString)) { try { var dataTable =