Reference

Endpoint Export Sheet (to PDF, Excel, CSV file)


Name

export_sheet

Description

Export Sheet to CSV, Excel or PDF file. [API reference]

Parameters

Parameter Required Options
Name: SheetId

Label: SheetId

YES
Name: Format

Label: Format

YES
Option Value
Excel application/vnd.ms-excel
PDF application/pdf
CSV text/csv
Name: PaperSize

Label: Paper Size (Only for PDF)

Option Value
LETTER LETTER
LEGAL LEGAL
WIDE WIDE
ARCHD ARCHD
A4 A4
A3 A3
A2 A2
A1 A1
A0 A0

Output Columns

Label Data Type (SSIS) Data Type (SQL) Length Description
Id DT_WSTR nvarchar(50) 50
Status DT_WSTR nvarchar(50) 50
TargetFilePath DT_WSTR nvarchar(2000) 2000
If the column you are looking for is missing, consider customizing Smartsheet Connector.

Input Columns

Label Data Type (SSIS) Data Type (SQL) Length Description
There are no Static columns defined for this endpoint. This endpoint detects columns dynamically at runtime.

Examples

SSIS

Use Smartsheet Connector in API Source or in API Destination SSIS Data Flow components to read or write data.

API Source

API Source - Smartsheet
Read / write SmartSheet data inside your app, perform many SmartSheet operations such as Read, Insert, Update, Delete, List, Search, Export on objects like Sheets, Rows, Users etc without coding with easy to use high performance API Connector
Smartsheet
Export Sheet (to PDF, Excel, CSV file)
Required Parameters
SheetId Fill-in the parameter...
Optional Parameters
RawOutputDataRowTemplate {"Id": "[$SheetId$]", "Status":"Done", "TargetFilePath":"[$TargetFilePath,FUN_JSONENC$]"}
SSIS API Source - Read from table or endpoint

API Destination

API Destination - Smartsheet
Read / write SmartSheet data inside your app, perform many SmartSheet operations such as Read, Insert, Update, Delete, List, Search, Export on objects like Sheets, Rows, Users etc without coding with easy to use high performance API Connector
Smartsheet
Export Sheet (to PDF, Excel, CSV file)
Required Parameters
SheetId Fill-in the parameter...
Optional Parameters
RawOutputDataRowTemplate {"Id": "[$SheetId$]", "Status":"Done", "TargetFilePath":"[$TargetFilePath,FUN_JSONENC$]"}
SSIS API Destination - Access table or endpoint

ODBC application

Use these SQL queries in your ODBC application data source:

Export Sheet (as PDF, Excel, CSV)

This example shows how to export Sheet to PDF, CSV or Excel file). If you export to PDF then you can also supply Paper size.

SELECT * FROM export_sheet WITH(
  SheetId=1592926391979908, 
 ,TargetFilePath='c:\temp\exported_sheet_as_excel_file.xlsx' --or .pdf, .csv   
 ,Format='application/vnd.ms-excel'  --or-- application/pdf  --or-- text/csv
--below Paper Size only valid for PDF
--,PaperSize='LETTER' --or LEGAL, WIDE, ARCHD, A4, A3, A2, A1, A0
)

SQL Server

Use these SQL queries in SQL Server after you create a data source in Data Gateway:

Export Sheet (as PDF, Excel, CSV)

This example shows how to export Sheet to PDF, CSV or Excel file). If you export to PDF then you can also supply Paper size.

DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM export_sheet WITH(
  SheetId=1592926391979908, 
 ,TargetFilePath=''c:\temp\exported_sheet_as_excel_file.xlsx'' --or .pdf, .csv   
 ,Format=''application/vnd.ms-excel''  --or-- application/pdf  --or-- text/csv
--below Paper Size only valid for PDF
--,PaperSize=''LETTER'' --or LEGAL, WIDE, ARCHD, A4, A3, A2, A1, A0
)';

EXEC (@MyQuery) AT [LS_TO_SMARTSHEET_IN_GATEWAY];