Reading A File Via Stream

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • spamguy
    New Member
    • Sep 2007
    • 42

    Reading A File Via Stream

    One function in this fabulous DLL requests a file read in the form of the Stream class...not StreamWriter or StreamReader or MemoryStream, just Stream. Since Stream is abstract, this makes it hard. I've done my best to bounce from Stream to MemoryStream to whatever else, but it just isn't working out. Here's all I have so far, which isn't much. Can someone fill in the blanks? Thanks!

    [code=cpp]
    public void GetData()
    {
    using (Stream stream = new MemoryStream())
    using (FileStream file = new FileStream(stre am))
    {
    // what goes here?
    book = ExcelXmlWorkboo k.Import(stream );
    }
    }
    [/code]
Working...