列番号の特定について

お世話になっております。
列番号(画像で写しているAとかB)を特定したいです。
状況としては例えばA列の「A」を変数で持っていてexcel write cellアクティビティで
書き込みをして次はA列の隣の列(B)に書き込みをしたいのですが
となりの列のアルファベットの特定方法が難しくご教示いただけますと幸いです。

列番号数字が分かれば特定はできるかと思いますが、「A」などのアルファベットの情報だけでとくていできるならそれを採用しようと考えておりますのでよろしくお願いいたします。

@asshiyuta,

Try this approach.

  1. Get Column index/number using this code in a variable:
intColumnIndex=UiPath.Excel.Helpers.ExcelUtilities.ConvertColumnLetterToColumnIndex("A")
  1. Increment the intColumnIndex by one using assign activity like this:
intColumnIndex=intColumnIndex+1
  1. Now convert the column index/number to letter for your use using this:
strNextColumn=UiPath.Excel.Helpers.ExcelUtilities.ConvertColumnIndexToColumnLetter(intColumnIndex)

Hi @asshiyuta

You can use the Find\Replace value activity to get the Cell name where the variable value contains. Then you can take reference of cell name to write the values in Column B.

Hope it helps!!

@ashokkarale @mkankatala
thanks so much!!!

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.