0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

スプレッドシートにGASで改行したメッセージを入力する

Posted at

Code

function messageSetValueIncludeNewLine() {
  const Spread = SpreadsheetApp.getActiveSpreadsheet();
  const Sheet = Spread.getSheetByName('sheet-name');
  const by_value = Sheet.getRange(vertical_position, horizontal_position);
  const past_range = Sheet.getRange(vertical_position, horizontal_position);
  const message = '<hello>' + String.fromCharCode(10) + by_value.getValue();
  past_range.setValue(message);
}

what intention ?

This code will help you want to display a message containing a line break based on a particular cell.
This code will help you if you want to display a message containing a line break based on a particular cell.

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?