RcBuilder@walla.com
call centre: 054-5614020

Read Excel Specific Column

Posted by: RcBuilder  /   Category: ADO.NET / List / OleDb / SOURCE CODE   /   No Comments
16
Jul
2014

Read Excel Specific Column public static List<string> ReadExcelSpecificColumn(string excel_path, string sheet_name, int column_index) { List<string> values = new List<string>(); OleDbConnection conn = null; OleDbDataReader dr = null; try { string connStr = string.Format("Provider=Microsoft.Jet.OLEDB.4.0; Ole DB Services=-4; Data Source={0}; Extended Properties=Excel 8.0;", excel_path); string query = string.Format("Select * From ", sheet_name); conn = new OleDbConnection(connStr); OleDbCommand cmd = new OleDbCommand(query, conn); conn.Open(); dr = cmd.ExecuteReader(); if (dr == null) return.

Read more
  • פיתוח מערכות
  • פתרונות טכנולוגים
  • קידום אתרים
  • בניית אתרים