I'm using the excel Javascript API and after searching through the docs, still can't find a solution for what I'm trying to achieve.
So I want to set everything to have the number format "Text" so none of Excel's auto-formatting messes with any of the cells' content (no removing leading zeros or changing date formats).
The docs suggest changing the format via:
Worksheets("Sheet1").Range("A17").NumberFormat = "General"
But it seems the sheet object doesn't contain a Range method.
Instead I tried to use the getRange method on my table like this:
constructionTable.getRange().NumberFormat = "Text"
This didn't throw any errors, but didn't seem to do anything.
Formatting the table range had previously worked for stuff like this:
constructionTable.getRange().format.autofitColumns()
So I also checked whether constructionTable.getRange().range.format
contains a method called NumberFormat or numberFormat, but it does not :(
Has anyone had any success doing this?