回覆列表
  • 1 # MJ推薦

    引用office11.0元件後, Microsoft.Office.Interop.Excel.Application application; //這是一個客戶端Microsoft.Office.Interop.Excel.Workbooks workbooks; //所有工作薄Microsoft.Office.Interop.Excel.Worksheet worksheet;//工作表Microsoft.Office.Interop.Excel.Workbook workbook; //所用到的工作表 void IsRunEX(){ OpenFileDialog openfilediaglog = new OpenFileDialog();openfilediaglog.Filter = "xls檔案|*.xls";if (openfilediaglog.ShowDialog() == DialogResult.OK){FieldName = openfilediaglog.FileName;application = new Microsoft.Office.Interop.Excel.Application();workbooks = application.Workbooks;workbook = returnworkbook(FieldName, workbooks);worksheet = (Microsoft.Office.Interop.Excel.Worksheet)workbook.Sheets[1]; //選擇第一個表

  • 中秋節和大豐收的關聯?
  • 吳孟達和周星馳拍過什麼電影?