NPOI icon indicating copy to clipboard operation
NPOI copied to clipboard

Use Memeory stream to read word file

Open Ofer-Gal opened this issue 5 years ago • 1 comments

I know how to read a file on disk with: using (FileStream file = new FileStream( etc..

Is there a way to do the same from Memory stream or the Byte[] that I get from HTTP?

Ofer-Gal avatar Jun 03 '19 23:06 Ofer-Gal

For example:

public static ISheet GetSheet_2003(string nameSheet, MemoryStream stream) { try { var excel = new HSSFWorkbook(stream); stream.Close(); return excel.GetSheet(nameSheet); } catch (Exception ex) { throw; } }

nguyenvanbien95 avatar Nov 13 '19 04:11 nguyenvanbien95