Bonjours à tous, je doit exporter des donnés dans un fichier excel.xlsx 2012
voici mon code :
le problème est que le fichier excel est illisible.// btn_save
FileStream fs = File.Create(@"C:\Users\...\test.xls");
IWorkbook temp = new HSSFWorkbook();
ISheet sheet = temp.CreateSheet("Feuil1");
IRow dataRow = sheet.CreateRow(4);
dataRow.CreateCell(0).SetCellValue(77);
sheet.ForceFormulaRecalculation = true;
MemoryStream ms = new MemoryStream();
temp.Write(ms);
ms.Close();
savez vous pourquoi?
Partager