Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/excel/24.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
Javascript Ext Js是否在Ext窗口或面板中打开excel文件和word文件?_Javascript_Excel_Extjs_Sencha Touch - Fatal编程技术网

Javascript Ext Js是否在Ext窗口或面板中打开excel文件和word文件?

Javascript Ext Js是否在Ext窗口或面板中打开excel文件和word文件?,javascript,excel,extjs,sencha-touch,Javascript,Excel,Extjs,Sencha Touch,在我的Ext js应用程序中,我想在面板中查看excel和word文件,我已尝试使用Iframe,下面我的代码仅在浏览器中下载excel,但我需要在面板中查看excel,如果我错了,请更正我的代码,提前感谢 new Ext.Window({ title : "Excel", width : 400, height: 800, layout : 'fit', items : [{ xtype : "component", au

在我的Ext js应用程序中,我想在面板中查看excel和word文件,我已尝试使用Iframe,下面我的代码仅在浏览器中下载excel,但我需要在面板中查看excel,如果我错了,请更正我的代码,提前感谢

new Ext.Window({
    title : "Excel",
    width : 400,
    height: 800,
    layout : 'fit',
    items : [{
        xtype : "component",
        autoEl : {
            tag : "iframe",
            src : "Demo.xls"
        }
    }]
}).show();

您可以尝试使用Google Docs显示excel文件:

    var ExcelFileName = *url to excel file*
    new Ext.Window({
        title : "Excel",
        width : 400,
        height: 800,
        layout : 'fit',
        items : [{
            xtype : "component",
            autoEl : {
                tag : "iframe",
                src : "https://docs.google.com/gview?url=" + ExcelFileName + "&embedded=true"
            }
        }]
    }).show();