简体   繁体   中英

Ext Js open excel file and word file in a ext window or panel?

In my Ext js application, I want to view excel & word file in panel, I've tried with Iframe , below my code only Download excel in browser but I need to view excel in panel, correct my code if I'm wrong, Thanks in advance.

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

You could try using Google Docs to display the excel file:

    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();

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM