Text to left/right activity extraction

Hi guys,
I am extracting text from multiple PDF documents using the Text to left/right activity.
I would like to have all the extracted text from the multiple pdf’s copied to a single excel document, then convert the single excel doc to pdf. Which activity do I use for:

  1. Copying the extracted info to a single excel file
    2.Converting the single excel file to PDF.

I have been able to confirm the text has been successfully extracted using a message box. Please explain to me step by step.Note I am using version 2023.10.0

@J_Crosby

  1. Use write cell to write the data to excel…if using in loop can use auto increment to change cell value for each loop
  2. Alternately can use build datatable to build a table as required…then use add data row to add the read data from pdf to the datatable in specified columns
  3. Then use write range to write datatable to excel
  4. IN excel activities you have an option save excel as pdf which can be used to save the final excel as pdf

Hope this helps

cheers

1 Like

Him
Hope the below steps would help u resolve this

  1. Create a new UiPath workflow.
  2. Add a For Each activity to the workflow.
  3. In the For Each activity, set the Collection property to the collection of PDF documents that you want to extract the text from.
  4. Add a Text to Left/Right activity to the For Each activity.
  5. In the Text to Left/Right activity, set the Input property to the current item in the collection.
  6. Add a Write Range activity to the For Each activity.
  7. In the Write Range activity, set the Input property to the extracted text from the Text to Left/Right activity.
  8. Set the Worksheet property to the Excel worksheet where you want to write the extracted text.
  9. Set the Append property to True so that the extracted text is appended to the Excel worksheet instead of overwriting it.
  10. Connect the Text to Left/Rightactivity to the Write Range activity.
  11. Connect the For Each activity to the End Sequence activity.

Example:

For Each
    * Collection: pdfDocuments
    * Text to Left/Right
        * Input: Current Item
    * Write Range
        * Input: ExtractedText
        * Worksheet: ExcelWorksheet
        * Append: True
* End For

U can use save excel as pdf to convert excel

https://docs.uipath.com/activities/other/latest/productivity/save-as-pdf-x

Or use a marketplace component

Cheers @J_Crosby

1 Like

copying the extracted text from multiple PDF documents into a single Excel file and then converting that Excel file into a PDF using the following steps:

Step 1: Extract Text from Multiple PDFs

*Use the “For Each” activity to loop through your list of PDF files.
*Within the loop, use the “Read PDF Text” activity to extract the text from each PDF file. You’ve mentioned you’re using the “Text to left/right” activity, which can be used here.
*Store the extracted text in a variable.

Step 2: Write Extracted Text to Excel

  1. Create an Excel application scope using the “Use Excel File” activity to work with Excel.
  2. Within the Excel scope, use the “Write Cell” or “Write Range” activity to write the extracted text into the Excel file. You may need to use a counter or row index to ensure the text from different PDFs is written to different rows in the Excel file

Step 3: Convert Excel to PDF

  1. Install the “UiPathTeam.ExcelExtensions” package if you haven’t already. This package provides the “Convert Excel to PDF” activity.
  2. Use the “Convert Excel to PDF” activity within the Excel application scope to convert the Excel file to a PDF.

@J_Crosby

1 Like

Hello @J_Crosby

Try with these steps

  1. Create Excel File (outside the loop)
  2. For Each PDF in ListOfPDFs
  3. Read PDF Text
  4. Append to Excel
  5. Save Workbook (after the loop)
  6. Excel Application Scope
  7. Export to PDF
1 Like

Hope it’s clarified @J_Crosby

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.