cancel
Showing results for 
Search instead for 
Did you mean: 

Convert Text to collection

Sudha_RPA
Level 3

Hi All,

I want to read the text file and write them as collection . Do Blueprism  have any VBO or any code stage to do this action. Can anyone suggest the steps



------------------------------
Sudha Priya
------------------------------
7 REPLIES 7

diane.sanzone
Level 7

Hi Sudha,

Your answer will really depend on your input file format, but generally for things like that I would use:

Utility - File Management - there are a few actions in here about getting data from files. You can read set lines, the whole file (assuming it's not too big), etc.  

Utility - Strings - There are a bunch of actions in this one that will help you split the data once you read it in. 

You'll likely need a combination of actions from the two utilities, but maybe you won't.  It's possible one of the file management actions will read the data into a nice collection for you to use and you won't have to parse it at all.

Good luck, and hope this helps!



------------------------------
Diane Sanzone
------------------------------

LakshmiNarayan3
Level 6

Hi

can you provide sample format of text

as other member mentioned you can check with both the vbo,

if you find any difficulty can provide the sample format so it will be helpful

Regards

Lakshmi Narayana P



------------------------------
Lakshmi Narayana
------------------------------

Hi ,

For example Consider the attached as a table present in PDF .I need to extract a pdf data which in table format and write into a collection.Is there any code to read pdf table and write into collection

381.png



------------------------------
Sudha Priya
------------------------------

Hi

Not sure why their is difference from initial ask ( was from text file )

coming to the pdf part,

is it native pdf file ? ( mean are you able to copy text to clip board by ctrl+a and ctrl+c)

is the format going to fixed for every file? ( having some constant key words)

also refer below post for some better view of your scenario

Need an idea for extracting specific information | Blue Prism University

Regards



------------------------------
Lakshmi Narayana
------------------------------

@Lakshmi Narayana the flow is like from pdf i have used copy to clipboard and got in text file. so i Initially asked for text to collection.

The main flow is i have to extract data from pdf and put it in collection as mentioned.

Main issue im facing is if I copy to clipboard i can find misalignment of data.

If there any possibility can u suggest any ways

Regards,

Sudha



------------------------------
Sudha Priya
------------------------------

i am not sure if we can retain the exact format by any action.

But what we can do is build regex based on the format what we get

i hope you have gone through the above thread so you will get an idea as the use case is almost same

if you have all possible cases of formats, then it will be easy to build regex

Regards



------------------------------
Lakshmi Narayana
------------------------------

Have you checked the other options like converting to other formats like excel or word

check the below threads 

PDF TO EXCEL | Blue Prism Product

Regards



------------------------------
Lakshmi Narayana
------------------------------