是否可以从silverlight在excel中打开电子表格
我已经从silverlight中的网格创建了一个电子表格,但是由于silverlight在沙箱中运行,因此无法直接从应用程序打开电子表格。我可以打开OpenFileDialog并选择文件,然后将其读入文件流。但是,我无法从silverlight应用程序在Excel中打开它是否可以从silverlight在excel中打开电子表格,excel,c#-4.0,silverlight-5.0,Excel,C# 4.0,Silverlight 5.0,我已经从silverlight中的网格创建了一个电子表格,但是由于silverlight在沙箱中运行,因此无法直接从应用程序打开电子表格。我可以打开OpenFileDialog并选择文件,然后将其读入文件流。但是,我无法从silverlight应用程序在Excel中打开它 OpenFileDialog openFileDialog = new OpenFileDialog(); if (ofd.ShowDialog() == true) {
OpenFileDialog openFileDialog = new OpenFileDialog();
if (ofd.ShowDialog() == true)
{
FileInfo sheet = openFileDialog.File;
if (sheet.Extension == ".xlsx")
{
FileStream stream = sheet.OpenRead();
// I need to either stream it to excel somehow
// or open it without the stream.
}
}
有人知道怎么做吗,或者即使有可能做到
提前感谢,
Lee这就是代码的来源,但它没有告诉我如何调用Excel并将文件流传输到Excel。