cancel
Showing results for 
Search instead for 
Did you mean: 

How to get the cel reference for a particular value in excel using Blueprism

JananiPR1
Level 3
Hello Everyone,

I have a requirement for getting the cel reference for a particular value in excel using blueprism. Can aynone help me to code this in blueprism.

Thanks,
Janani PR

------------------------------
Janani PR
------------------------------
7 REPLIES 7

NupurSood
Level 5
Hello Janani

The below mentioned code will give you the cell address of the first occurrence of the value:

Inputs: Workbook,Worksheet,Handle and Findmatch
Output: CellAddress

Dim wb, ws As Object
Dim excel, sheet As Object

wb = GetWorkbook(Handle, Workbook)
ws = GetWorksheet(Handle, Workbook, Worksheet)

wb.Activate()
ws.Activate()
excel = ws.Application
sheet = excel.ActiveSheet
CellAddress=sheet.Cells.Find(What:=Findmatch, LookIn:=-4123, LookAt:=1, SearchOrder _
:=1, SearchDirection:=1 ,MatchCase:=False, SearchFormat:=False).Address


Regards

------------------------------
Nupur Sood
Research Associate
S&P
Asia/Kolkata
------------------------------

Hi Nupur Sood,

 

I tried the below code for finding the cell reference ..But its shows the below error:

 

27768.jpg

 

Can u help me to resolve the issue?

 

 

Thanks,

Janani PR

 



Hello Janani

Am not sure why are you getting these errors because the code works fine at my end. Would you be able to add a screenshot of your code stage please. 

Thanks

------------------------------
Nupur Sood
Research Associate
S&P
Asia/Kolkata
------------------------------

Hi,

 

Please find the below screenshot of the code stage which I used in my blueprism.

 

27770.jpg

 

 

Thanks,

Janani PR



Get rid of the underscore - that's the continuation separator that Nupur used to split the code onto 2 lines. You have it in one line, so get rid.

------------------------------
Anton Hosang
RPA Developer
Smart Automation Services
Europe/London
------------------------------

How use the parameters for input?

------------------------------
Ronaldo Junior Oliveira Benzi
------------------------------

Hi @Ronaldo_JuniorO,

You can open any action page within any business object in Object Studio. Upon double clicking on the 'Start' stage, you can see that you will get the start stage properties where you can add input parameters and map them to data items in that action page to map.


For example, below you can see I have opened the 'Start' stage of the 'Remove Blank Rows' action within 'MS Excel' VBO. Here, I can click on the 'Add' button and assign input parameters to different data items: 
27782.png

------------------------------
----------------------------------
Hope it helps you out and if my solution resolves your query, then please mark it as the 'Best Answer' so that the others members in the community having similar problem statement can track the answer easily in future

Regards,
Devneet Mohanty
Intelligent Process Automation Consultant | Sr. Consultant - Automation Developer,
WonderBotz India Pvt. Ltd.
Blue Prism Community MVP | Blue Prism 7x Certified Professional
Website: https://devneet.github.io/
Email: devneetmohanty07@gmail.com

----------------------------------
------------------------------
---------------------------------------------------------------------------------------------------------------------------------------
Hope this helps you out and if so, please mark the current thread as the 'Answer', so others can refer to the same for reference in future.
Regards,
Devneet Mohanty,
SS&C Blueprism Community MVP 2024,
Automation Architect,
Wonderbotz India Pvt. Ltd.