in Education by
If you call javascript window.open and pass a url to a .xls file it open on some machines in the browser window. How can you force it into Excel? JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
Only the users machine can "force" it into Excel. That said, 99% of the time if you send the correct mime-type and a user has Excel, then it will open in Excel assuming they approve. And only the server can send the correct mime-type. The document type you pass to a JavaScript window.open call will have no effect on this. In fact, calling window.open will at best just open a superfluous window. It's best to just link to the document with . And provided your server is sending a mime-type of application/x-excel or application/x-msexcel this will almost always nudge the browser into opening a new window with the Excel document.

Related questions

0 votes
    runApp() will run the shiny and open the browser window. (a) True (b) False I had been asked ... questions and answers pdf, Data Science interview questions for beginners...
asked Oct 28, 2021 in Education by JackTerrance
0 votes
    runApp() will run the shiny and open the browser window. (a) True (b) False...
asked Oct 5, 2021 in Technology by JackTerrance
0 votes
    what is the spreadsheet component in ms-office ? (1) ms-word (2) ms-excel (3) ms- power point (4) ms- paint Select the correct answer from above options...
asked Nov 29, 2021 in Education by JackTerrance
0 votes
    Without using both the record and system utility script, how can you open a notepad window?...
asked Oct 19, 2020 in Technology by JackTerrance
0 votes
    So I'm trying to make box and whisker plots for my weekly/monthly profit and loss for my sports betting picks for ... gotten me so far And following that here is my code exceldata...
asked Apr 7, 2022 in Education by JackTerrance
0 votes
    The body section displays the main content on the browser window. True or false. No spam Select the correct answer from above options...
asked Dec 25, 2021 in Education by JackTerrance
0 votes
    Write code in HTML to divide the browser window into 3 horizontal sections and display college name in the top most frame. Select the correct answer from above options...
asked Dec 22, 2021 in Education by JackTerrance
0 votes
    tag produces a horizontal line in the browser window. C. a. b. d. Select the correct answer from above options...
asked Dec 9, 2021 in Education by JackTerrance
0 votes
    internet explorer has been replaced by _________web browser in window 10 Select the correct answer from above options...
asked Nov 27, 2021 in Education by JackTerrance
0 votes
    Which identifier is used to represent a web browser window or frame? (a) frames (b) window (c) ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 23, 2021 in Education by JackTerrance
0 votes
    Each tab in the single web browser window is called as ____________ (a) Browser Information (b) Browsing ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 23, 2021 in Education by JackTerrance
0 votes
0 votes
0 votes
    I have one aspx page with 1000 anchor tag. I want to open single popup onclick of anchor tag & ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 20, 2022 in Education by JackTerrance
0 votes
    I want my browser to open my local images and to place them at the center of my browser. The ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 20, 2022 in Education by JackTerrance
...