The other answer, to set the format to ‘plain text’ in javascript, doesn’t work. However, this does:
sheet.getRange(1,n).setNumberFormat('@STRING@');
So the magic value for formatting text programmatically is ‘@STRING@’!
More Related Contents:
- Refresh data retrieved by a custom function in Google Sheet
- How do you create a “reverse pivot” in Google Sheets?
- Create Google Calendar Events from Spreadsheet but prevent duplicates
- ultimate short custom number formatting – K, M, B, T, etc., Q, D, Googol
- Google Apps Script: How to set “Use column A as labels” in chart embedded in spreadsheet?
- Retrieving Google Sheets cell border style programmatically
- Determining the last row in a single column
- Cannot find method getRange(number,number)?
- How do I add formulas to Google Sheets using Google Apps Script?
- You do not have permission to call openById
- Google Apps Script, copy one spreadsheet to another spreadsheet with formatting
- Single Google Form for multiple Sheets [duplicate]
- Adding Buttons To Google Sheets and Set value to Cells on clicking
- How do I communicate a page(modal dialog) with its sibling (sidebar)?
- How to replace text in Google Spreadsheet using App Scripts?
- Google Apps Script date format issue (Utilities.formatDate)
- Custom function throws a “You do not have the permission required to setValue” error
- Margins parameters for Google spreadsheet export as PDF
- Google Apps Script: Dynamically creating spreadsheet menu items
- Script to convert .XLSX to Google Sheet and move converted file
- email notification if cell is changed
- Hidden field in a Google Form
- Apply multiple font colors to the text in a single Google Sheets cell
- How to evaluate a spreadsheet formula within a custom function?
- Google Sheet use Importxml error could not fetch url [duplicate]
- On Edit doesnt work if cell auto updates – Need a workaround Google Sheets
- Adding a property to an Html template gives error “Object does not allow properties to be added or changed”
- We’re sorry, a server error occurred while reading from storage. Error code PERMISSION_DENIED
- Custom Functions and Recalculation
- e.range.getA1Notation() unable to track changes caused by formula update