How to switch to different conditions

Hi,

I need to extract data from different documents from a website. There are 7 different formats for the documents. How can I extract the data for these. Please let me know process for it

To extract data from different documents on a website with 7 different formats, you can follow the steps :

  1. Web Scraping:
  • Use UiPath’s web scraping capabilities to navigate to the website and extract the documents. You can use activities like “Data Scraping” to extract structured data from tables, lists, or other web elements.
  1. Identify Document Types:
  • You will need to identify the document types by analyzing their structure or content. Each type might have unique characteristics that can help you distinguish between them.
  1. Document-Specific Logic:
  • Create document-specific logic for parsing each format. Depending on the format, you may need to use different techniques. For example:
    • For PDFs, you can use the “Read PDF Text” activity to extract text and then apply regular expressions to find specific data.
    • For Excel or CSV files, you can use the “Read Range” activity to read data into a DataTable.
    • For HTML pages, you can use the “Get Text” activity or CSS selectors to extract data.
    • For text files, you can read the content directly and process it.
  1. Conditional Logic:
  • Based on the document type or characteristics, apply the appropriate parsing logic. Use conditional statements (If-Else) to determine which logic to use for each document.

5.Data Extraction and Storage:

  • Extract the required data from the documents using the specific logic you’ve defined. You can use variables or DataTables to store the extracted data.

@raju_alakuntla