select data from an excel sheet and display it in a datagridview public void ImportExcel2007(string path) { FileInfo filePath = new FileInfo(path); DataTable workSheetsTable = new DataTable(); DataTable columnsTable = new DataTable(); string connString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + path + ";Extended Properties='Excel 12.0;IMEX=1; HDR=YES'"; OleDbConnection excelConnection = new OleDbConnection(connString); excelConnection.Open(); //This bit assumes the first worksheet is the one to import, //change this as required. workSheetsTable = excelConnection.GetOleDbSchemaTable(OleDbSchemaGui d.Tables, null); string tableName = workSheetsTable.Rows[0]["TABLE_NAME"].To String(); //This section uses the tableName declared above to get a //list of columns for that worksheet only. columnsTable = excelConnection.GetOleDbSchemaTable(OleDbSchemaGu...
ERP Project Management,Asp.net,PL SQL Tips for error resolution,Research,Software Errors and solution,SQL 2014,2012,2008,Procedural language,SP,Power BI,excel macro ,Musical notations,Business software,Degree, diploma related informations.