Skip to content
This repository has been archived by the owner on Sep 21, 2021. It is now read-only.

OfficeHelpers.Utilities.platform returns null in Excel for Windows #38

Closed
SoftTimur opened this issue Aug 11, 2017 · 3 comments
Closed
Assignees

Comments

@SoftTimur
Copy link

Hello,

I load the following page as an Excel add-in in Excel (Office 365 Version 1706) for Windows 7. It shows EXCEL as host, but null as platform. I cleared my browser history before the tests...

It seems that for the same code, it showed PC yesterday...

Shouldn't it be always PC in Excel for Windows?

Thank you

<html>
    <head>
        <script src="https://appsforoffice.microsoft.com/lib/1/hosted/office.js"></script>
        <script src="https://unpkg.com/@microsoft/office-js-helpers@0.6.3/dist/office.helpers.min.js"></script>
    </head>
    <body>
        <div id="console"></div>
        <script>
            debug("OfficeHelpers.Utilities.host: " + OfficeHelpers.Utilities.host + "<br/>");
            debug("OfficeHelpers.Utilities.platform: " + OfficeHelpers.Utilities.platform);

            function debug(msg) {
                if (document.getElementById("console") !== null)
                    document.getElementById("console").innerHTML += msg;
            }
        </script>
    </body>
</html>
@WrathOfZombies
Copy link
Contributor

Another host detection problem. Could be related to #37 . @Zlatkovsky thoughts?

@WrathOfZombies
Copy link
Contributor

This bug tracks all the issues with identification of hosts. @Zlatkovsky may be we need to revisit the logic for platform detection.

@WrathOfZombies
Copy link
Contributor

Closing this as we do not have a consistent repro.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants