What is the maximum data size for matrix bindings in an Excel Task Pane App?

93 views Asked by At

I created an excel task pane app with microsofts JavaScript API. I created an binding to the excel sheet that contains some data.

Something like:

Column1 | Column2
Value1  | Value2
Value1  | Value1
Value2  | Value3

My App created a chart for each column (with dc.js). Then the User can filter with the charts so that the app can write the filtered data into the binding.

Everything works fine with a small binding range. When i increase the binding range to approximately 1500 rows and 3 columns, he won't update the binding data. Excel don't show me some errors, it just do nothing.

This is a simplified version of my code:

createBinding({ id, callback = ()=>{}, type = 'matrix' }) {
    Office.context.document.bindings.addFromSelectionAsync(type, {id}, callback);
}

// options = { coercionType: "matrix" }
setBindingData({ id, data, options, callback }) {
    Office.select(`bindings#${id}`).setDataAsync(data, options, callback);
}

I think the problem is the max size of all data. But i would like to know what the maximum size is? I couldn't find something on stackoverflow or in the Microsoft documentation.

2

There are 2 answers

1
Ron On

It could be because O365 does not allow any single operation to hang the app for more than 5 seconds. Try using async calls.

0
stu On

I was interested in this question too and so ran some tests and there seems to be a huge difference between empty cells and data. I could bind and read data from nearly 4 million blank cells. But when I added some simple data this came down to around 90,000 cells. The shape of the binding didn't seem to matter too much, be it tall or wide. So I suspect your cells might have a lot more data in them than my test data.

You might be able to work something out using the documentselectionchanged handler instead. E.g. loop through the rows and as it changes get the data.

See http://microsoft-office-add-ins.com for more information.