cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Re: Dropbox Embed Excel Sheet support

Dropbox Embed Excel Sheet support

moosterbaan
Helpful | Level 6
Go to solution

We are using the new Dropbox embedder to show files on our website. It is working overall, with the exception of excel sheet tabs. The excel sheet loads correctly, but on mobile devices the user cannot switch excel worksheets/tabs. There is an overlay menu that has buttons to switch to full screen or to print. I believe that the overlay is preventing tabs to be switched. If you switch to full screen mode, it is possible to switch worksheets.

Here is the code that is being used:

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script type="text/javascript" src="https://www.dropbox.com/static/api/2/dropins.js" id="dropboxjs" data-app-key="myAppKey"></script>
    <script type="text/javascript">

    </script>
    <style>
        body, html, form {
            width: 100%;
            height: 100%;
            margin: 0;
            padding: 0
        }

        .row-container {
            display: flex;
            width: 100%;
            height: 100%;
            flex-direction: column;
            overflow: hidden;
        }

        .row {
            flex-grow: 1;
            border: none;
            margin: 0;
            padding: 0;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server" style="text-align:center">
        <div class="row-container">
            <a id="theFrame" class="dropbox-embed row"></a>
        </div>
    </form>
</body>
</html>
<script type="text/javascript">
    let theFrame = document.getElementById('theFrame');

    Dropbox.embed({
        link: "https://www.dropbox.com/mysharedlink.xlsx?dl=0"
    }, theFrame);
</script>
1 Accepted Solution

Accepted Solutions

moosterbaan
Helpful | Level 6
Go to solution

I decided to try this again, and am happy to report that this is now working as expected.

View solution in original post

3 Replies 3

Greg-DB
Dropbox Staff
Go to solution

Thanks for the report! We'll look into it.

 

By the way, the Embedder offers two different ways to set it up:

You only need to use one or the other, but it looks like you're currently trying to use both. That is, you have both the "dropbox-embed" class on an anchor, as well as using 'Dropbox.embed' to set the embed on that same element. To avoid complications, please just use one of the two methods.

moosterbaan
Helpful | Level 6
Go to solution

Thank you for looking into it.

I updated our code to use the Javascript method only.

moosterbaan
Helpful | Level 6
Go to solution

I decided to try this again, and am happy to report that this is now working as expected.

Need more support?