Closed RW-DiefBell closed 4 years ago
I've found that the way to do this is set the value using Date. To get only the hours/minutes component I've used cell.value(new Date(0, 0, 0, 11, 52, 0);
for getting 11:52.
Note that this still isn't getting around this issue of it overriding the initial styling.
I'm attempting to populate an existing spreadsheet where some of the columns are already formatted as being for "[h]:mm" number format, however the actual formatting is not applied. For it to work, you have to open the spreadsheet, open the cell, then exit it again for the formatting to be applied. This obviously isn't workable for spreadsheets with thousands of rows...
I've also tried to set the formatting in my code using
style("numberFormat", "[h]:mm");
, but this also does not work (and also removes the original styling). Is there something I'm doing wrong or is this a missing feature/bug?Many thanks