cancel
Showing results for 
Search instead for 
Did you mean: 

Notepad to Excel copying data

Murali_MohanKon
Level 4
Hi All,  I need to copy data from notepad to Excel file , i should come each column in different column only.Please share any idea. Thanks in advance. Thanks Murali
6 REPLIES 6

ArchiveUser
Level 4
Sorry I don't have a solution Murali, but I have the same question.   Any ideas would be appreciated. Thank you.   Sameen

BenKirimlidis
Level 7
It seems like there should be a simple one step solution. I have gotten working using these steps 1-5 below. What I have been able to do: 1. MS EXCEL VBO - Create Instance Open excel and store the handle in a data item 2. MS EXCEL VBO - OpenWorkbook Open the text file using the handle created in step 1. 3. MS EXCEL VBO - OpenWorkbook Open a new workbook ( I have a formatted .xlsx template I use but you don't strictly need this, can just be a newly created blank workbook) 4. MS EXCEL VBO - Show Pass the handle created in step 1 and shwo the excel.  This step is not required and will actualyl slow down the running of the process but I do it in DEV so I can check it's working on the fly. 5. MS EXCEL VBO - Copy and Paste Worksheet Range Copy from the .txt file to the .xlsx file. See attached image.

BenKirimlidis
Level 7
In step 3 above, have to use the same handle the instance created in step 1.  Couldn't get it working using two diferent handles for different instances. Hope this helps you

ArchiveUser
Level 4
Thank you Ben_M31! This is definitely helpful.   I will try out what you have suggested and share my findings.

BenKirimlidis
Level 7
No problem.  I'll check this post later today/tomorrow, let me know if you have any problems.

BenKirimlidis
Level 7
Hi mkonanki, I had the same issue, on the other thread I posted a solution that will work for this.https://portal.blueprism.com/forums/tech-chat/general-tech-discussion/notepad-excel-copying-data Problem I had If you try and import a text file into a collection you'll end up with a single column collection. Fix I went with If you open the .txt file as a .xlsx and copy paste that into anothe exce lfile, it will put them into different columns. Import that into a collection. Alternate method Another thing you can try is importing the text file int oa colelction, then for each row (single text field) you can separate the text into an array separated by spaces usign the object 'Utility - Strings' action 'Split Text'. Useful for separating A name into a first name and second name. Problem here is if some of the fields are empty then the collection will be out of sync.