merge sheets using vba

phanikumarg

New Member
I have a excel with 5 sheets. I need to club all the sheets to make a single work sheet. How will you make it in VBA(VB Script)
 

VJR

Well-Known Member
Hi phanikumarg,

How about using the 'Copy and Paste Worksheet Range' action of the Ms Excel VBO versus writing a new code.
If you correctly give the source and destination parameters this will work as expected.
 

VJR

Well-Known Member
Hi naveedraza,

There are tons of code on the web like the below which uses VB/VBA to merge multiple sheets into one sheet.
https://www.rondebruin.nl/win/s3/win002.htm
You will need to find any suitable code and modify it to accommodate into Blue Prism's Code stage by making the necessary changes for its Visual Basic semantics.
On the other hand if you mention that you are new to BP then it is always recommended to use a ready made BP VBO action if it is available versus a VB/VBA code.
 
Hi VJR

Thank you so much clarifying my doubt.

as a profession i am a VBA Developer and VBA Automation. I can write a code, just for curiosity how can i write a code in code stage , can we write directly code into code stage without starting without "Sub procedurename() "
 

VJR

Well-Known Member
Hi naveedraza,

Below are some links that will help on how to write a code in Blue Prism to interact with Excel.

The code for accessing an Excel application is advisable to be written in one of the new tabs in the MS Excel VBO because all the required functions like getting the workbook handle, calls to API, etc. are already written in this VBO (in the Initialise tab open the Information stage -> Global Code tab and check).
I am into VBA development too and I'm sure since you are already aware of VBA, writing code in BP to interact with Excel would not be a difficult task.

These are direct links. Clicking on them will take you to to the direct post on that thread.
http://rpaforum.net/threads/how-to-...ooter-of-excel-using-blueprism.1075/post-3255
http://rpaforum.net/threads/excel-vbo.1031/post-3056
http://rpaforum.net/threads/filter-excel-data-by-specific-criteria.992/post-2912
http://rpaforum.net/threads/vba-excel-sorting.509/post-2808
http://rpaforum.net/threads/excel-cell-color-identification.1039/post-3087

Along with these links you can also open any of the Code stages of the MS Excel VBO and take a look at them.
 
Hi VJR,

Thank you so much it means a lot to me. These will help in understanding the way of writing code in BP.

Thank you again :)
 
  • Like
Reactions: VJR
Top