cancel
Showing results for 
Search instead for 
Did you mean: 

How can I extract Value from txt file ?

JohnOnyekachi
Level 2
Dear Team,

Please I need help extracting values from a txt file, I am new to Blue prism and need a guild on this thanks.

I have provided a screen shot of the value I want to extract from the txt file. 

Thanks 

36358.png
1 BEST ANSWER

Best Answers

ewilson
Staff
Staff
@JohnOnyekachi,

If you are that new to Blue Prism I'd suggest you spend some time going through the Basic Training labs available on the Digital Exchange. You can find them here. It's possible to get through all of the labs in a single day, and it will give you a good grounding in working with Blue Prism.

I've attached a very simple example of one possible way to open a text file, read in its contents, and then separate those contents into a Collection which you could then loop through in order to process each individual line. I created a small text file and tried to mimic your screenshot a bit, but it's unclear whether that text file is using spaces, tabs, whatever.

If your Blue Prism environment hasn't already had the Utility - File Management and Utility - Strings VBOs imported into it, you can find them in your Blue Prism installation directory, within the folder titled VBO. Otherwise, you can find both of them on the Digital Exchange.

Cheers,
Eric​

View answer in original post

5 REPLIES 5

ewilson
Staff
Staff
Well, I suppose there are a few ways you might do this. First, are sure this is a regular TXT file? Was it converted from something else? The reason I ask is that you might use Blue Prism Decipher for document processing of things like invoices, receipts, etc. That's performed with OCR and ML. This is something a bit over-and-above just straight Blue Prism Enterprise.

If this really is just a plain TXT document you could use the Utility - File Management VBO to simply read the TXT file line-by-line and then perform string/pattern matching to determine where you are and pull out the needed data.

Cheers,
Eric

JohnOnyekachi
Level 2
@ewilson 
Many thanks for your response, it is a plain TXT document ,

please can you help with a sample of how to use the 
Utility - File Management VBO to simply read the TXT file line-by-line and then perform string/pattern matching to pull-out data.

ewilson
Staff
Staff
@JohnOnyekachi,

If you are that new to Blue Prism I'd suggest you spend some time going through the Basic Training labs available on the Digital Exchange. You can find them here. It's possible to get through all of the labs in a single day, and it will give you a good grounding in working with Blue Prism.

I've attached a very simple example of one possible way to open a text file, read in its contents, and then separate those contents into a Collection which you could then loop through in order to process each individual line. I created a small text file and tried to mimic your screenshot a bit, but it's unclear whether that text file is using spaces, tabs, whatever.

If your Blue Prism environment hasn't already had the Utility - File Management and Utility - Strings VBOs imported into it, you can find them in your Blue Prism installation directory, within the folder titled VBO. Otherwise, you can find both of them on the Digital Exchange.

Cheers,
Eric​

JohnOnyekachi
Level 2
@ewilson, Many thanks I will download and complete all Training labs session.

JayitaSaha
Level 2
You can use Utility - File Management . If it is not available in your environment you have to import it first. In Utility - File Management you can able to find proper action to read txt file.

Hope it will help you, John.
Have a good day!