We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Programmatically trigger "open" command from backstage

Thread ID:





133065 Oct 6,2017 09:40 PM UTC Oct 9,2017 07:20 AM UTC JavaScript 1
Tags: ejSpreadSheet
James Pham
Asked On October 6, 2017 09:40 PM UTC

Hi, can you advise on how to programmatically trigger the "open" command from the spreadsheet's backstage? I understand there's an "import" method available,

<div id="Spreadsheet"></div> 
var excelObj = $("#Spreadsheet").data("ejSpreadsheet"); // Initialize the Spreadsheet object.
var importRequest = { Url:"http://staging.syncfusion.com:7777/ejSpreadsheet/Spreadsheet.xlsx" };
but I would like to take advantage of the file dialog that comes with the backstage open command so the user can import an excel file from the user's local filesystem.

Thanks in advance.


Sangeetha Priya Murugan [Syncfusion]
Replied On October 9, 2017 07:20 AM UTC

Hi James Pham,   
Thank you for contacting Syncfusion Support. 
We have checked your query and your requirement for programmatically trigger the "FILE->Open" option can be achievable in Spreadsheet. Please refer the following code example.  
    <button id="fileImportBtn">File Import</button> 
    <div id="Spreadsheet"></div> 
$("#fileImportBtn").click(function () { 
        var ssObj = $("#Spreadsheet").data("ejSpreadsheet"); 
         //Import File using ribbon action programmatically. 
         $("#" + ssObj._id + "_file .e-uploadinput").click(); 
For your convenience, we have prepared a sample to demonstrate this in JSPlayground.  
Sangeetha Priya M  


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon