例題
例えばこのような受領書をメールとし受け取り、その中にある受領番号を抽出したいとします。
Studioなら正規表現とMatchesアクティビティで一発だが……
(?<=トランザクションID:).*(?=\n)
ここから、トランザクションIDを抜き出したい!そういう時は、正規表現を使って一発です。本文をString型で取得し、Matchesアクティビティを使って上記の正規表現でマッチした結果Matches(0)を抽出すればいいだけの話ですが、今回はStudioX向け。つまり初学者向けに正規表現とかわからなくても、Excelの機能を使って抽出をしていきたいと思います。
初学者が陥りやすいケースその1 Excel
初学者が陥りやすいパターンの一つとしては、一つのセルに本文データをすべて抽出してしまうというケースです。
本文を一つのセルに入れがちです。これだと、抽出をするのが難しくなってきます。
[データ テーブルを生成]を使用して、文字列をテーブルにする
ひとつのセルにすべての本文を貼り付けるのではなく、各行ずつに本文を抽出できればいいのです。
ここで必要なアクティビティが「データテーブルを生成」です。概要としては、テキストをデータに変換してくれるアクティビティです。まずオプションをクリックします。
①は必須ではないです。サンプルとなる文字列としてメールの本文を手動で入力してみます。(サンプル入力したほうがわかりやすいので便宜上行っているだけです)
②改行文字から[改行]を選択し、
③プレビューを押下
すると、テストプレビュー欄に行ごとに区切られたデータが生成されるので、OKボタンを押下します。
ノートブックを開いてみます。無事に各行ごとにExcelに反映されていることを確認できました。
このままだと、A5セルには不要な文字があるので、隣の列C5に数式を記入します。
=SUBSTITUTE(A4,”トランザクションID:”,””)
数式を埋め込んだセル番地に名前「トランザクションID」を入力します。
サンプルワークフローを見てみる
以下がサンプルファイルになります。
このワークフローの注意点
抽出したい値の行数が異なる場合
置換したい文字列が異なる場合
エラーになるので気を付けてください。
14件のフィードバック
Very nice info and straight to the point.
I don’t know if this is actually the best place to ask but do you
folks have any ideea where to employ some professional writers?
Thank you 🙂 Escape roomy lista
Very interesting points you have remarked, regards for posting.!
I like this weblog it’s a master piece! Glad I noticed this on google.
Euro travel guide
Oh my goodness! a tremendous article dude. Thanks However I’m experiencing problem with ur rss . Don’t know why Unable to subscribe to it. Is there anyone getting an identical rss problem? Anybody who knows kindly respond. Thnkx
hey there and thanks in your info – I have definitely picked up something new from proper here. I did then again experience a few technical points the usage of this website, as I skilled to reload the website lots of times previous to I may get it to load properly. I were puzzling over if your web hosting is OK? Now not that I’m complaining, however sluggish loading cases occasions will very frequently impact your placement in google and can harm your quality ranking if ads and ***********|advertising|advertising|advertising and *********** with Adwords. Anyway I’m adding this RSS to my e-mail and can look out for much more of your respective interesting content. Ensure that you replace this again soon..
Whoa! This blog looks just like my old one! It’s on a entirely different subject but it has pretty much the same layout and design. Great choice of colors!
I always was concerned in this topic and still am, appreciate it for posting.
with me you can have fun on the phone am ready for any outrage. natural cam girls me and have fun.
I think this site has got some rattling excellent info for everyone : D.
I like what you guys are up also. Such intelligent work and reporting! Carry on the excellent works guys I have incorporated you guys to my blogroll. I think it’ll improve the value of my site 🙂
hello there and thank you in your information – I have certainly picked up something new from right here. I did however expertise some technical issues the usage of this web site, since I skilled to reload the site a lot of times previous to I may just get it to load correctly. I had been wondering if your hosting is OK? Not that I am complaining, but slow loading instances times will often impact your placement in google and can harm your high-quality ranking if advertising and ***********|advertising|advertising|advertising and *********** with Adwords. Well I’m adding this RSS to my email and could glance out for a lot more of your respective fascinating content. Make sure you update this once more very soon..
Hey there! Do you know if they make any plugins to help with Search Engine Optimization? I’m trying to get my website
to rank for some targeted keywords but I’m not seeing
very good success. If you know of any please share.
Thanks! I saw similar article here: Blankets
I’m still learning from you, while I’m trying to achieve my goals. I definitely liked reading everything that is posted on your site.Keep the tips coming. I liked it!
I have to express my thanks to this writer for bailing me out of this problem. Just after researching throughout the internet and seeing tips that were not powerful, I was thinking my life was done. Living without the strategies to the difficulties you’ve solved by means of your good blog post is a serious case, as well as those which might have negatively damaged my career if I had not encountered your site. Your main mastery and kindness in handling the whole thing was tremendous. I am not sure what I would have done if I had not encountered such a solution like this. I can also at this moment look forward to my future. Thank you very much for this specialized and amazing help. I will not think twice to suggest your web page to any individual who needs tips on this situation.