none
addrowasync truncating an array RRS feed

  • Question

  • I am trying to loop through an object I am returning from an ajax call and add the rows to an excel table.

    When I step through my code I can see that there are 67 items in my array and I can see that it goes through all of them in my $.each. The problem is when they are inserted into the table only the first 49 will insert into the table.

    I have also just hardcoded text into the rows I will be adding and it still truncates it at 49.

    Is there a row limit for inserting to a table?

    Could it be something to do with the async calls?

    Thanks for the help.

    D

    Thursday, April 25, 2013 1:57 PM

All replies

  • Hi D,

    could you upload a sample project to skydrive and share with us :)


    with regards, Yuri

    Friday, April 26, 2013 2:14 AM
  • Hi D,

    This is by design of Office App framework.

    When we call an Office App api from JS, it is not immediatly executed. Instead, Office App framework queue this task into Office host app's queue, and return back to JS immediatly after the "enqueue" action is finished. Then later, the host app's main loop is resonsible to execute the api task queue when it is idle. Office App framework explicitly limit the length of the api queue to be no more than 50.

    Hope this answered your question.

    Thanks,

    Xiaofeng


    Xiaofeng

    Thursday, March 13, 2014 2:49 AM