HOW TO USE TWO EXCEL FILE AND CALL EACH ROW VALUE? ONE FOR ENTERING DATA INTO A WEBFORM AND ANOTHER FILE FOR GIVING NAME FOR THE WEBFORM?

HELLO THERE.
I AM AKTAB. I WAS TRYING TO CREATE AUTOMATION FOR ENTERING DATA FROM EACH ROW OF FIRST EXCEL FILE TO A WEBFORM AND SAVE THE PAGE AS PDF. WHEN SAVING THE NAME I WANT TO USE A SEQUENCIAL NAME LIKE FILE_1 OR JUST “1”. FOR THAT I AM CALLING ANOTHER EXCEL FILE IN UiPath AND WANT TO SAVE THE FILENAME FROM THE 2ND EXCEL FILE.
CAN ANYONE HELP ME?
THANK YOU.

Hi @aktab

Can you try this-

  1. Use a For Each Row activity to iterate through each row of the Excel file.
  2. Within the loop-
  • Open the web form in a browser using the Open Browser activity.
  • Use activities like Type Into, Click, or Select Item to enter the data from the current row into the appropriate fields on the web form.
  • Save the web page as a PDF using the Save As PDF activity
  • Extract the desired sequential name for the PDF file from the second Excel file using the Excel Application Scope activity and read the corresponding cell value.
  • Concatenate the extracted name with a counter or row index variable to form the file name for the PDF.
  • Save the PDF file with the generated name using the Write PDF Text activity or other appropriate activities.

Thanks!!

THANK YOU @Nitya1 ,
I’M TRYING TO. BUT I THINK I’M MAKING A MISTAKE SOMEWHERE.
HOW CAN I ITERATE THE SECOND EXCEL FILE. AS LIKE
FIRST EXCEL HAS 2034,2085,4U22,43FJ THESE VALUES AND SECOND EXCEL FILE HAS 1,2,3,4.
NOW WHAT I DO IS:

  1. READ RANGE WORDBOOK SETTING A DATA TABLE FOR IT.
  2. THEN FOR EACH ROW THERE I CREATE A CURRENTROW VARIABLE.
  3. OPENING BROWSER AND WEB FORM. DOING THE TYPE INTO, CLICK
  4. SAVING PDF.
  5. FOR SAVING OPENING ANOTHER EXCEL WITH 1,2,3,4
  6. FOR EACH ROW TYPE INTO SAVE FILE NAME.
    I THING I AM DOING SOMETHING WRONG HERE.

IT DOES NOT CONTINUE AFTER FIRST NAME IS SAVE AND STOPS MARKING WITH RED WINDOW TO THE NEXT EXCEL FILE CALLING.

IS THERE ANY WAY TO GET THE SECOND EXCEL ROW VALUES WITHOUT EACH ROW?

@Nitya1
I THINK I AM LACKING OF THIS PART. I DON’T KNOW HOW TO DO IT.

  • Concatenate the extracted name with a counter or row index variable to form the file name for the PDF. *

Hi @aktab

Try this approach.

1 Use the “Excel Application Scope” activity to open the first Excel file and read the data into a DataTable using the “Read Range” activity.
2. Use a “For Each Row” activity to loop through each row in the DataTable obtained from the Excel file.
3. Within the loop, use activities such as “Type Into” or “Set Text” to enter the data from each row into the corresponding fields of the web form.
4. Use the “Send Hotkey” activity to simulate the “Ctrl+P” hotkey combination to open the print dialog. Then, use activities such as “Type Into” or “Set Text” to set the necessary print options.

  • Use the “Type Into” activity to provide the sequential filename (e.g., “FILE_” + counter.ToString) in the “Save As” dialog box.
  1. Use the “Excel Application Scope” and “Read Cell” activities to read the sequential name from the second Excel file.
  2. After saving each PDF, increment the sequential name by 1.
  3. Repeat the process for each row: Continue the loop to process the remaining rows of the first Excel file

Thanks!!.

@Nitya1
what is the counter here how can i define it and increment it. and if i’m using counter then why should use the second excel file for saving name?

I’m though having another problem in the send hot key the process stops. beside it says no condition defined. i don’t understand why i should define a condition. though i have two task before CTRL + P.
I have to search the number from first excel and type it into web form.
then click search. Then two click option comes where i have to click the second option.

the problem may be sometimes the next page automatically comes without clicking the second option. Can this be the problem if so please help me?