コード例 #1
0
        private void button4_Click(object sender, EventArgs e)
        {
            if (op1.ShowDialog() == DialogResult.OK)
            {
                //注释部分 与NPOI 不能同时调用同一个文件
                //userex.Open(op1.FileName);
                // userex.ws = userex.GetDefaultSheet();

                devicedt = NPOI.ImportExcel(op1.FileName);

                //dgvDevice.DataSource = devicedt;
            }
        }
コード例 #2
0
 private void button1_Click(object sender, EventArgs e)
 {
     NPOI.ExportDataToExcelNoDialog(devicedt, deviceDataFileName, null, null);
     //NPOI.ExportDataToExcel(devicedt, "321", null, null);
 }