Based from this blog, you can set the formatting of a single cell, a whole column starting from a specific cell or an entire spreadsheet. You can find additional resources on the Google Sheet support page for number formats.
// Use these first two lines for all four examples
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getSheets()[0];
// Single cell
var cell = sheet.getRange("B2");
// Plain text
cell.setNumberFormat("@");
Also from this google forum, you can use range.setNumberFormat('@STRING@');
to format cells to plain text.
Check these links:
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@'!
Hope this helps!