Does epplus package requires to write to a file right away? or can it generate a memoerystream as an output?
It doesn't generate a stream. It writes to a stream. That stream can be a FileStream, MemoryStream, or any other stream.
FileStream
MemoryStream