office365apps-for-office

Getting complete Excel sheet data in Office Add In


It is easy to get the selected part of a Excel 365 document with

 Office.context.document.getSelectedDataAsync()

But how do I get the complete sheet?


Solution

  • Right now, the only two things you can do are

    Office.context.documents.getSelectedDataAsync();
    

    and

    Office.context.document.getFileAsync();
    

    We're unable to pull a sheet directly. Though, depending on the amount of data you're pulling, you may be able to use

    Office.FilterType.OnlyVisible