none
Matrix binding in Excel app doesn't seem to auto grow with new data entered the way a Table binding grows RRS feed

  • Question

  • Hi experts,

    I have a question around Matrix vs. Table bindings.

    In my Excel task pane app, user can put in a questionnaire ID and download questions related to the questionnaire and upload data back to the service. Now in order to transfer the data between the app and my service, I create a binding (of type Table) when the user downloads the questions and as the user enters data into the sheet (row wise), the binding seems to grow automatically - meaning when I later on get the data in the binding, I get all the newly entered rows of data also.

    But if I try to use a Matrix binding on the sheet, and user adds new rows to the sheet (answers), when I retrieve the data in the binding later, I only get the rows that were present when I created the binding. None of the new rows of data entered by the user are returned. Am I missing something with this workflow?

    How can I make sure that I get the entire set of data entered by the user with a matrix type binding the same way I can with a table type binding without having to do something special?

    Let me know if you need me to elaborate on this.

    Thanks in advance,
    Shahnaz.

    Tuesday, November 6, 2012 8:24 PM

Answers

  • Hi, Shahnaz

    Great question! Auto-growing the binding size is one of the special features of Table bindings. You probably noticed that in Excel, tables resize dynamically to fit the content. That's why Table bindings have the same behaviour.

    If you specify the Matrix binding type, you're telling Excel explicitly that you only want to bind to a specific range of cells, not an expandable data set. That's why a Matrix binding type won't expand - its purpose is to stay fixed.

    So my question to you is: "Why do you want to use a Matrix binding in the first place?" If you want auto-grow, my recommendation is to use a Table binding.

    Thanks!

    -Michael

    • Marked as answer by inahs Wednesday, November 7, 2012 12:37 AM
    Tuesday, November 6, 2012 10:51 PM
    Moderator

All replies

  • Hi, Shahnaz

    Great question! Auto-growing the binding size is one of the special features of Table bindings. You probably noticed that in Excel, tables resize dynamically to fit the content. That's why Table bindings have the same behaviour.

    If you specify the Matrix binding type, you're telling Excel explicitly that you only want to bind to a specific range of cells, not an expandable data set. That's why a Matrix binding type won't expand - its purpose is to stay fixed.

    So my question to you is: "Why do you want to use a Matrix binding in the first place?" If you want auto-grow, my recommendation is to use a Table binding.

    Thanks!

    -Michael

    • Marked as answer by inahs Wednesday, November 7, 2012 12:37 AM
    Tuesday, November 6, 2012 10:51 PM
    Moderator
  • Thanks for the confirmation Michael.

    About me using the matrix binding - I actually started out with Table binding, but I could not figure out a way to prevent the headers from showing - even if I don't set any header data, I get the default column1, column2 header. So I thought I could use matrix binding to overcome that issue but ran into the auto growing issue.

    Have to figure out if I can somehow stop the default header from showing up in the spreadsheet with table data & table bindings.

    Thanks again,
    Shahnaz.

    Wednesday, November 7, 2012 12:40 AM
  • how to find the range of matrix of excel 
    Monday, March 11, 2013 12:39 PM