答案 0 :(得分:-1)
如果你可以从xls导出.csv,你可以:
string[] lines = System.IO.File.ReadAllLines(@"yourFolder\yourCsv.csv");
// Display the file contents by using a foreach loop.
string[] arr;
foreach (string line in lines)
{
//you get an array with each cell value
arr=line.split(";")
//do what you want with arr[1] which i suppose is the col you are interested to
}
或者如果您想使用.xls文件格式,可以使用LinqToExcel 正如Optimal way to Read an Excel file (.xls/.xlsx)
所建议的那样