///
///生成excel表格
///
///
///
publicvoid OutPwd(System.Data.DataTable dtData,
string fileName, string getDate)
{
try
{
string filePath = AppDomain.CurrentDomain.BaseDirectory + @"MainPage\DataService\Public\PublicExcel\FileExcel\" + fileName + ".xls";
string modelPath = AppDomain.CurrentDomain.BaseDirectory + @"MainPage\DataService\Public\PublicExcel\ModelExcel\JXCBGF WCModel.xls";
#region NPOI 导出Excel
FileStream file = new FileStream(modelPath, FileMode.Open, FileAccess.Read);
HSSFWorkbook hssfworkbook = new HSSFWorkbook(file); HSSFSheet sheet1 = hssfworkbook.GetSheet("Sheet1"); HSSFRow dr1 = sheet1.CreateRow(0);