Export data from an HTML table into CSV file

Introduction

In many data integration scenarios, extracting data from web sources and saving it in a structured format is essential. This tutorial will guide you through the process of extracting an HTML table from a web page and saving it as a CSV file using the powerful SSIS PowerPack components.

Prerequisites

  • SSIS PowerPack: Download and install the ZappySys SSIS PowerPack from here.

Steps

  1. Start by dragging and dropping a Data Flow Task onto the control flow.

  2. Inside the Data Flow Task, add an HTML Table Source component.
    HTML table source inside in a Data flow

  3. Configure the HTML Table Source by providing a URL that contains a table. We’ll use Example 1 from our components, specifically Table 9, and then preview the data to verify the information.

  4. Add a CSV Destination component and connect it to the HTML Table Source.

  5. Before configuring the CSV Destination, create a File Connection and choose a valid CSV file.
    image

  6. In the CSV Destination component, select the file connection you created in the Connection Managers tab.

  7. In the Component Properties tab, choose the options you need for your CSV file.

  8. In the Input Columns tab, select the columns you want to save in your CSV file. You can check the column or the input column to add a new column.

  9. Run the package, and it will extract the HTML table and save it in a local CSV file.
    HTML table source and CSV destination example

Video Tutorial

Conclusion

You have successfully retrieved an HTML table and stored it in a CSV file using SSIS PowerPack components. If you encounter any issues or need further assistance, feel free to contact our support team via chat on our website.

References