テキストファイルstr_A内の改行コードを数えるUiPath構文を教えてください

UiPath Studio 2023.10.0 EnterPrise Licenseの初心者ユーザです。

テキストファイルstr_A内の改行コードを数えるUiPath構文を教えてください。
int32型変数int_改行コード数に結果を出力したいです。

Hi @gorby

Use the below syntax in assign activity
Output (int Data Type) = str_A.Split(Environment.NewLine.ToCharArray()).Length - 2

Regards

Hi @gorby

If you find the solution please do mark my post as solution to close the loop.

Regards

Hi @gorby

Thank You.

Happy Automation!!

こんにちは

上記の式では改行記号がWindowsOSのもの(CR+LF)だと、正しい値にはならないのでは?
以下の方が良いように思えます。

strData.Count(function(c) c=chr(10))

簡単なサンプルで試してみてはと思います。

1 Like

Hi @Yoichi

Thanks for letting me know about the issue that arises for the solution I have provided.

Regards

1 Like

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