W
william.oram
One function in this fabulous DLL (http://www.codeproject.com/KB/
office/excelxmllibrary.aspx) 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!
public void GetData()
{
using (Stream stream = new MemoryStream())
using (FileStream file = new FileStream(stream))
{
// what goes here?
book = ExcelXmlWorkbook.Import(stream);
}
}
office/excelxmllibrary.aspx) 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!
public void GetData()
{
using (Stream stream = new MemoryStream())
using (FileStream file = new FileStream(stream))
{
// what goes here?
book = ExcelXmlWorkbook.Import(stream);
}
}