EndPoint Export Sheet (to PDF, Excel, CSV file)
Name
export_sheet
Description
Export Sheet to CSV, Excel or PDF file. [API reference]
Parameters
Output Columns
Label | Data Type (SSIS) | Data Type (SQL) | Length | Raw | Description |
---|---|---|---|---|---|
Id |
DT_WSTR
|
nvarchar(50)
|
50 | False |
|
Status |
DT_WSTR
|
nvarchar(50)
|
50 | False |
|
TargetFilePath |
DT_WSTR
|
nvarchar(2000)
|
2000 | False |
Input Columns
Label | Data Type (SSIS) | Data Type (SQL) | Length | Raw | 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 component to read data or in API Destination component to read/write data:
Export Sheet (to PDF, Excel, CSV file) using API Source
Smartsheet
Export Sheet (to PDF, Excel, CSV file)

Export Sheet (to PDF, Excel, CSV file) using API Destination
Smartsheet
Export Sheet (to PDF, Excel, CSV file)

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 [LINKED_SERVER_TO_SMARTSHEET_IN_DATA_GATEWAY];