标签:io cti ar new res table file log
需为2003版本
private void button1_Click(object sender, EventArgs e)
{
string resultFile = "";
OpenFileDialog openFileDialog1 = new OpenFileDialog();
openFileDialog1.InitialDirectory = "D:";
openFileDialog1.Filter = "All files (*.*)|*.*|xls files (*.txt)|*.xls";
openFileDialog1.FilterIndex = 2;
openFileDialog1.RestoreDirectory = true;
openFileDialog1.Multiselect = true;
if (openFileDialog1.ShowDialog() == DialogResult.OK)
{
resultFile = openFileDialog1.FileName;
}
if (resultFile == "")
{ }
else
{
dt = FunctionExcel.ExcelToDataTable(resultFile, "Sheet1");
dgv_Data.DataSource = dt;
}
}
DataTable dt_new = new DataTable();
dt_new = dgv_Data.DataSource as DataTable;
标签:io cti ar new res table file log
原文地址:http://www.cnblogs.com/alina-he/p/3873243.html