developpement:dotnet:csharp:dotnetzip
Ceci est une ancienne révision du document !
DotNetZip
Décompresser un fichier XML en mémoire
string xlsxFile = @"N:\FichierExcelImportant.xlsx"; ZipFile zipFile = ZipFile.Read(xlsxFile); ZipEntry zipEntry = zipFile["xl/workbook.xml"]; List<string> xmlContents = new List<string>(); using (var ms = new MemoryStream()) { zipEntry.Extract(ms); ms.Position = 0; var sr = new StreamReader(ms); var myStr = sr.ReadToEnd(); xmlContents.Add(myStr); } xmlContents.Select(x => x).First().Dump();
developpement/dotnet/csharp/dotnetzip.1481042937.txt.gz · Dernière modification : 2022/02/02 00:43 (modification externe)