c#怎么创建excel文件并写入数据

2024-11-09 10:33:43
推荐回答(1个)
回答(1):

#region 从DataTable读取内容来创建Workbook对象: public static MemoryStream RenderToExcel(DataTable table) { MemoryStream ms = new MemoryStream(); using (table) { IWorkbook workbook = new HSSFWorkbook(); ISheet sheet = workbook