1
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 1 year has passed since last update.

WorkatoAdvent Calendar 2023

Day 8

Workato:ExcelのLeft, Right, Mid関数のように文字列を抜き出したい

Posted at

いずれもFormulaモードに切り替えて対応します。

左からn文字分の文字列を抜き出す(Excelにおける Left関数に相当)

左から3文字分抜き出す

"あいうえお".slice(0,3)
# ==> "あいう"

image.png

右からn文字分の文字列を抜き出す(Excelにおける Right関数に相当)

右から2文字分抜き出す

"あいうえお".slice(-2,2)
# ==> "えお"

image.png

特定の位置からn文字分の文字列を抜き出す(Excelにおける Mid関数に相当)

2文字目から3文字分抜き出す

"あいうえお".slice(1,3)
# ==> "いうえ"

image.png

1
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
1
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?