Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/csharp-4.0/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
是否可以从silverlight在excel中打开电子表格_Excel_C# 4.0_Silverlight 5.0 - Fatal编程技术网

是否可以从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) {

我已经从silverlight中的网格创建了一个电子表格,但是由于silverlight在沙箱中运行,因此无法直接从应用程序打开电子表格。我可以打开OpenFileDialog并选择文件,然后将其读入文件流。但是,我无法从silverlight应用程序在Excel中打开它

        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。