protected void Button1_Click(object sender, EventArgs e)
{
Thread test = new Thread(new ThreadStart(GetOpenFile));
test.SetApartmentState(ApartmentState.STA);
test.Priority = ThreadPriority.Highest;
test.Start();
test.Join(300);
}
private void GetOpenFile()
{
SheetView sheet = listGID1060010.Sheet[0];
OpenFileDialog fb = new OpenFileDialog();
bool? res = fb.ShowDialog();
if (null != res)
{
sheet.Cell[1,1].Value = fb.FileName;
}
}
用这种方式取得的文件路径如何赋值到表格中,正常赋值好像不太行
|