Search code examples
office365office-2013

Office 2013 apps: How to set cell styles for task pane apps in Excel 2013


I'm writing a Microsoft excel task pane app for the first time. I understand the JavaScript API that Microsoft has created to bind to different cells.

I do not see anything within the JavaScript API that would allow you to do common functions like:

  1. Changing the active sheet
  2. Creating new sheets
  3. Changing cell colors, fonts, sizes, borders, etc.

I'm wondering how to accomplish these functions... Do I have to incorporate a VB file into my app, and if so, how?

Thanks!!


Solution

  • You are correct.

    The creation of new sheets, changing formatting should be left either to the user or you could provide a workbook for them that would represent a templated layout with styling.

    With regards changing the active sheet, it's likely you won't need to do this. The API provides bindings that enable you to attach to cells, matrices and tables anywhere in the workbook and these give two-way bindings with the data.

    If you describe the scenario you envisage, I could have a go at providing some pointers.