16. RPA Challenge - Create PieChart From Excel File

It is now in my earlier answer. Uploading again here.MakeChart.xaml (14.9 KB)

~RPA Ninja

1 Like

Can U Please Upload Code For Barchart ?

hi @kirtiSagar

In the same code you can use send hot key as Alt+N+B+enter

Thanks
Ashwin S

Want VB Code For This ?

hi @kirtiSagar

Use the below code and mention the range
Sub BarchartMethod()

Dim rng As Range
Dim cht As Object

'Your data range for the chart
Set rng = ActiveSheet.Range(“A24:M27”)

'Create a chart
Set cht = ActiveSheet.Shapes.AddChart2

'Give chart some data
cht.Chart.SetSourceData Source:=rng

'Determine the chart type
cht.Chart.ChartType = xlXYScatterLines

End Sub
Thanks
Ashwin S

1 Like

Hi Folks,

I used simply sequence.
I wish to write one day a proces with invoked code. @vvaidya this is cool!

Gosia
16. RPA Challenge.zip (493.4 KB)

Hi Rammohan,

I am trying to test your activity and I get the error below:

What am I doing wrong? It seems to be a problem with Excel. I have Office 2016 installed. Do you think it has something to do with Office version?

Thanks,
Viorela

Hi Avanish,

Can you please try to upload now?

Hi Kirti and Ovi,
Please find the solution and let me know for any difficulty in it.
test_Graph.xaml (17.7 KB)
Book1.xlsx (8.5 KB)
final_data.xlsx (9.0 KB)

2 Likes

Hi @kirtiSagar,
sorry for this late response, but as they say, better late than never :wink: Here is a simple solution in three activitiesPie Chart.xaml (7 KB)
:

  1. selecting the range,
  2. selecting a pie chart to be created,
  3. saving the file.

Hi @ovi and @badita

I have create a custom activity to generate the Pie chart for the excel file data.

I would be happy to get more suggestions .

Regards
Balamurugan

1 Like

Hi @kirtiSagar

I have developed a package for your challenge that I have attached it above with your example. Is this solution that you expected…

Thank
Balamurugan

Bump :slight_smile: :smile:

1 Like

Very simple:
Go to excel workbook and do the following:

  1. Open a blank workbook in Excel .
  2. Go to File > Options > Trust Center.
  3. Click on Trust Center Settings…
  4. Under Macro Settings, make sure Trust access to the VBA project object model is checked.

Download the following zip : Easyupload.io - Upload files for free and transfer big files easily. ( new users can not upload files therefore I uploaded this file for you ) .

Place excel file and vba script under : C\Excel
Create new sequence as you see in picture attached ( inside the zip)

Click play and N-Joy

Don’t need any new packages .
@admins please mark this challenge as completed :slight_smile:

@badita please mark this discussion as completed :slight_smile:

Dear KirtiRanjan Sahoo,

The easiest way to create a pie chart from Excel data is given below:

Steps:

  1. Enable Trust access to the VBA project object model

  2. In your Main Workflow, invoke VBA code for making a Pie Chart.

  1. VBA code for generating a simple Pie Chart is given

Before/After:

For reference, please find the workflow as attached.

PieChartFromExcel.zip (33.5 KB)

2 Likes

Excellent Statement! I’ve been almost trying to explain this to others around me about the difference between RPA and traditional coding and automation.

:slight_smile:

Felt the need to post a video of my solution following my last post to this thread. This solution tries to demonstrate how RPA processes distinguish themselves from traditional backend counterparts by focusing on imitating user actions first.

When I present code-heavy solutions during my Demos, one question I have been asked is why would we need to use RPA if I have to write code? What’s the difference?

In addition, such a solution becomes less easier to relate to front-line business users.

But it is true that not all problems can be solved by user actions alone. Some things will require code-behind solutions. But my lesson learnt is that we have to focus on designing better Human-Bot interfaces by focusing on human impersonation first and then going the way of code next.

My Demo Video from the RPA Vanguard Channel. Due credit has been give in the description to @kirtiSagar in the description for posting the original challenge question. :+1:

Hey @kirtiSagar please have a look at the easy and simplest process to create piechart, If you have any queries, do let me know
PieChart.zip (9.3 KB)