There's a new text wrapping mode called Clip in the new Google Sheets.
getWraps()
/setWraps()
still works with boolean values. When I set wrap value to true
, text in that cell is displayed in Overflow mode.
I've found no trace of any new function to set the text wrapping to Clip.
Does anybody know how to deal with that?
Google Sheets offers three text wrap options: Overflow, Wrap, and Clip. Overflow, the default, extends text over any blank adjacent cells. Wrap maintains column width and extends row height to display all text. Clip truncates the display of text in a cell at the width of the cell.
There's new method available for setting text wrapping strategy: Range.setWrapStrategy(strategy)
Example:
// Sets all cells in range B2:D4 to use the clip wrap strategy.
var sheet = SpreadsheetApp.getActiveSheet();
var range = sheet.getRange("B2:D4");
range.setWrapStrategy(SpreadsheetApp.WrapStrategy.CLIP);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With