none
Office JS has Issues with Excel Online ? RRS feed

  • Question

  • Hi Fei , 

      It is very weird to see this error in console whenever i start to load the task pane office app in Excel Online. 

      is it that Office JS has any issue inside Run time of Excel Online version .??

      I dont understand this behaviour in Excel Online version.  Could you please quickly help me on this issue ?

    Excel online issue with Office JS

    Regards,
    Ram

    Monday, December 8, 2014 2:05 PM

All replies

  • Hi Ram,

    As far as I know there are 1.0 and 1.1 version of Office javascript library and they are not depend on excel online version (sharepoint).

    There is the requirement for browser. Please refer to this link below to check the supported browser:

    # Apps for Office in the browser

    https://support.office.com/client/Supported-browsers-in-Office-2013-and-Office-365-ProPlus-57342811-0dc4-4316-b773-20082ced8a82#__apps_for_office_1

    If you still have the issue, please tell us these questions below:

    1. What’s the version that you used? You may upgrade the office JavaScript library to the latest version.
    2. Could you have the same issue in other browser?
    3. Could you reproduce that issue in a new project?

    Best Regards

    Starain


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, December 9, 2014 9:08 AM
    Moderator
  • Hi Starain,

    1. What’s the version that you used? You may upgrade the office JavaScript library to the latest version.
      I used the version Office.js  V1.0
    2. Could you have the same issue in other browser?
      Yes. but this is not a regular issue.  This happens whenever we retry after getting the App Error as mentioned in the below image. 


      Issue2 : 


    3. Could you reproduce that issue in a new project?

               yes, fyi , very first time when i load the app into excel online, I am sure of getting this App Error. 
              After few times of usage, creating a new sheet and loading the app fails on first time (Occurs atmost 20%)and thereafter retrying with clicking the 'retry' button in the image , i am able to see the error "Office is undefined" in the chrome logs .. In such case i can not load any data into excel sheet due to undefined binding.

              If possible , could you please run this app repeatedly and check the logs ?? I hope , this information will give an insight for you. Please let me know if you need any further details.

     Regards,
     Ram


    Thursday, December 11, 2014 2:51 PM
  • Hi Ram,

    What's the version of your browser?

    Regards

    Starain


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, December 12, 2014 8:57 AM
    Moderator
  • Hi Starain, 

     My chrome version is 39.0.2171.71 m (latest update). 

    Adding more clarity to this issue now. 

    After Inserting the app into excel sheet online in chrome browser, the app is added well and we can access the functionalities very well and there is no issue in loading Office script.  

    But when i reload iframe on clicking "reload iframe" option (Right click on app and click "reload iframe") and when the app loads for second time, i could see the undefined script error in console as mentioned above in the posts from office.js while loading the hosted script

    https://appsforoffice.microsoft.com/lib/1.0/hosted/office.js

    And i am using window.location.reload() script in our code to reload the app while logging out. 

    Please help me on this issue resolved. 

    Regards,

    Ram

    Friday, December 12, 2014 3:44 PM
  • Hi Ram,

    Thanks for your feedback, but I failed to reproduce your issue by creating a new task pane app.

    1. Create a new Task Pane App and change the Office JavaScript API version to 1.0;
    2. Debug the application in Excel Online;
    3. Reload the iframe several times and the app is loaded correctly.

    Please let me know if I missing any steps.

    Regards,

    Jeffrey


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Tuesday, December 16, 2014 3:14 AM
    Moderator
  • Hi Jeffrey, 

       Could you please check the console logs in chrome browser developer tool on frame Reloading..

      For me, App is pretty good in loading on frame reload. But , Office js reference is lost in the App run time on reloading.. 

    Regards,

    Ram

    Wednesday, December 17, 2014 8:59 AM
  • Hi , 

    There is a conflict between angularjs ng-include tag and Officejs initialization function. That is why we get "Undefined is not a function"error

    You can replicate by creating a sample task pane Excel web app and replace the Home.html file with the below content(Home.html)  and add a new html file (third.html) in the same directory. 

    --third.html --

    <H1>Third!</H1>

    -----Home.html----

    <!DOCTYPE html>
    <html ng-app="plunker">
    <head>
    	<meta charset="UTF-8" />
    	<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
    	<title>sampleapp</title>
    	<script src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.9.1.min.js" type="text/javascript"></script>
    	
    	<script src="https://appsforoffice.microsoft.com/lib/1.0/hosted/office.js" type="text/javascript"></script>
    	
    	  <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.2/angular.js"></script>
      <script>
    var app = angular.module('plunker', []).run(function($templateCache,$http){
          $templateCache.put('first.html', 'First template');
          $templateCache.put('second.html', '<b>Second</b> template');
          $http.get('third.html', {cache:$templateCache});
    });
    
    
    app.controller('MainCtrl', function($scope) {
      $scope.name = 'World';
    });
      </script>
    </head>
    <body ng-controller="MainCtrl">
       Select:
      <a href ng:click="tpl='first.html'">first</a> | <a href ng:click="tpl='second.html'">second | <a href ng:click="tpl='third.html'">third</a>
      <hr>
      <ng:include src="tpl"></ng:include>
    </body>
    <script>
    	Office.initialize = function (reason) {
       var s = 0;
    
         }
    	
    </script>
    </html>
    
    

    Could you please provide me a quick solution for this.. This issue happens only in online excel apps version but there is no issue with desktop task pane apps.

    Regards,

    Ram

     

    Sunday, December 21, 2014 4:42 PM