I am implementing an interface that has 2 parameters: (System.IO.Stream input, System.IO.Stream output)
.
If the input stream was originated in an XLSX file I would be using DocumentFormat.OpenXml.Packaging.SpreadsheetDocument
to read the document.
If it was CSV it would be even easier: StreamReader.ReadLine()
.
However the stream is coming from an XLS file and I am not quite sure how to read it correctly.
I was trying to figure out whether Microsoft.Office.Interop.Excel
can read streams but I'm not sure it is possible.
Is there any way to analyse an XLS file provided via System.IO.Stream
?