RT:最好给代码语句

解决方案 »

  1.   

    TextBox1.Text=OPENFILEDIALOG1.FileName
      

  2.   

            private void btnExcelPathImport_Click(object sender, EventArgs e)
            {
                ofdExcelImport = new OpenFileDialog();
                ofdExcelImport.Filter = "Excel文件(*.xls)|*.xls";
                if (ofdExcelImport.ShowDialog() == DialogResult.OK)
                {
                    txtExcelPath.Text = ofdExcelImport.FileName;
                }
            }
      

  3.   

    我在做打开文件夹对话框的用的语句中OPENFILEDIALONG.FILENAME怎么处理才能显示路径
      

  4.   


                string[] urlA;
                if (openFileDialog1.ShowDialog() == DialogResult.OK)
                {
                    urlA = openFileDialog1.FileNames;
                    string m_路径 = urlA[0];
                    txt路径.Text = m_路径;
                }