Skip to content

Downloadfromsmartsheet

flowtask.components.DownloadFromSmartSheet

DownloadFromSmartSheet Download an Excel file from SmartSheet.

  Example:

  ```yaml
  DownloadFromSmartSheet:
    comments: Download an SmartSheet Tab into an Excel file.
    file_id: '373896609326980'
    file_format: application/vnd.ms-excel
    destination:
      filename: WORP MPL 2022.xlsx
      directory: /home/ubuntu/symbits/worp/files/stores/
  ```

DownloadFromSmartSheet

DownloadFromSmartSheet(loop=None, job=None, stat=None, **kwargs)

Bases: SmartSheetClient, DownloadFromBase

DownloadFromSmartSheet

Overview

Download an Excel file or CSV file from SmartSheet.

Properties (inherited from DownloadFromBase)

.. table:: Properties :widths: auto

+--------------------+----------+-----------+----------------------------------------------------------------------+
| Name               | Required | Summary                                                                          |
+--------------------+----------+-----------+----------------------------------------------------------------------+
| credentials        |   Yes    | Credentials to establish connection with SharePoint site (username and password) |
|                    |          | get credentials from environment if null.                                        |
+--------------------+----------+-----------+----------------------------------------------------------------------+
| create_destination |   No     | Boolean flag indicating whether to create the destination directory if it        |
|                    |          | doesn't exist (default: True).                                                   |
+--------------------+----------+-----------+----------------------------------------------------------------------+
| api_key            |   No     | The SmartSheet API key (can be provided as an environment variable or directly   |
|                    |          | set as a property). If not provided, tries to use the `SMARTSHEET_API_KEY`       |
|                    |          | environment variable.                                                            |
+--------------------+----------+-----------+----------------------------------------------------------------------+
| url                |   No     | Base URL for the SmartSheet Sheets API (default:                                 |
|                    |          | https://api.smartsheet.com/2.0/sheets/).                                         |
+--------------------+----------+-----------+----------------------------------------------------------------------+
| file_id            |   Yes    | The ID of the SmartSheet file to download.                                       |
+--------------------+----------+-----------+----------------------------------------------------------------------+
| file_format        |   No     | The desired file format for the downloaded data (default:                        |
|                    |          | "application/vnd.ms-excel"). Supported formats are:                              |
|                    |          | * "application/vnd.ms-excel" (Excel)                                             |
|                    |          | * "text/csv" (CSV)                                                               |
+--------------------+----------+-----------+----------------------------------------------------------------------+
| filename           |   Yes    | The filename to use for the downloaded file.                                     |
+--------------------+----------+-----------+----------------------------------------------------------------------+

Save the downloaded files on the new destination.