| | |
| | | } |
| | | } |
| | | } |
| | | using (Stream stream = File.OpenWrite(filename)) |
| | | try |
| | | { |
| | | hssfworkbook.Write(stream); |
| | | if (report) MessageBox.Show(filename + "\n\n导出完毕! ", "提示 ", MessageBoxButtons.OK, MessageBoxIcon.Information); |
| | | using (Stream stream = File.OpenWrite(filename)) |
| | | { |
| | | hssfworkbook.Write(stream); |
| | | if (report) MessageBox.Show(filename + "\n\n导出完毕! ", "导出失败 ", MessageBoxButtons.OK, MessageBoxIcon.Information); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | //提示导出失败,error框 |
| | | |
| | | MessageBox.Show("导出失败" + ex.Message, "提示",MessageBoxButtons.OK,MessageBoxIcon.Error); |
| | | } |
| | | |
| | | |
| | | } |
| | | else |