7
2

More than 5 years have passed since last update.

Google Spreadsheet 半角から全角に変換

Last updated at Posted at 2018-09-28
GAS.gs
function toFullWidth(value) {
  if (!value) return value;
  return String(value).replace(/[!-~]/g, function(all) {
    return String.fromCharCode(all.charCodeAt(0) + 0xFEE0);
  });
}

使い方は、セルに

=toFullWidth(123)

みたいに入力してください

123 ▶ 123

で表示されます。

全角▶半角は、GSでは無いとされてる? ASC() で出来ました。
しかし、テストは英数のみ。カタカナとかできなさそうです

丸コピです、m(__)m。
http://shanabrian.com/web/javascript/to-full-width.php

7
2
1

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
7
2