Here is an image showing Python scope activity:
I am trying to execute a script in UIPath using Python scope, Python load activity, invoke python method and get python object which is mentioned below:
The execution is getting completed without any errors/exceptions. But there is no .xlsx file written. The code is not getting executed/ the arguments are not passed correctly. Kindly help.
import sys
import pandas as pd
import xlsxwriter
def excel_data (arg1,arg2,arg3,arg4):
df = pd.DataFrame({‘SODA RISK’: [arg1,arg2,arg3,arg4]})
writer = pd.ExcelWriter(‘try_python.xlsx’, engine=‘xlsxwriter’)
df.to_excel(writer,sheet_name=‘Sheet1’)
writer.save()