C# export excel.xlsx 2010
Bonjours à tous, je doit exporter des donnés dans un fichier excel.xlsx 2012
voici mon code :
Citation:
// 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();
le problème est que le fichier excel est illisible.
savez vous pourquoi?