Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

smartsheet/smartsheet-csharp-sdk

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Smartsheet SDK for C# Build Status NuGet

C# SDK to simplify connecting to the Smartsheet API from .NET applications.

System Requirements

The SDK supports C# version 4.0 or later and targets .NET 8.0.

Installation

To add the SDK to a .Net project

dotnet add package smartsheet-csharp-sdk

Example Usage

To call the API, you will need an access token, which looks something like this example: ll352u9jujauoqz4gstvsae05. You can find the access token in the UI at Account > Personal Settings > API Access.

The following is a brief sample that shows you how to:

  • Initialize the client
  • List all sheets
  • Load one sheet
using Smartsheet.Api;
using Smartsheet.Api.Models;

static void Sample()
{
    SmartsheetClient smartsheet = new SmartsheetBuilder()
        // TODO: Set your API access in environment variable SMARTSHEET_ACCESS_TOKEN or else here
        // .SetAccessToken("JKlMNOpQ12RStUVwxYZAbcde3F5g6hijklM789")
        .Build();

    PaginatedResult<Sheet> sheets = smartsheet.SheetResources.ListSheets(new List<SheetInclusion> { SheetInclusion.SHEET_VERSION });
    Console.WriteLine("Found " + sheets.TotalCount + " sheets");

    long sheetId = (long) sheets.Data[0].Id;

    Console.WriteLine("Loading sheet id: " + sheetId);

    var sheet = smartsheet.SheetResources.GetSheet(sheetId);
    Console.WriteLine("Loaded " + sheet.Rows.Count + " rows from sheet: " + sheet.Name);
}

A simple, but complete sample application project is here: https://github.com/smartsheet-samples/csharp-read-write-sheet

Advanced Topics

For details about logging, testing, how to use a passthrough option, and how to override HTTP client behavior, see Advanced Topics.

Documentation and Changelog

The full Smartsheet API documentation is here: https://developers.smartsheet.com/api/smartsheet/

The changelog for the public API is here: https://developers.smartsheet.com/api/smartsheet/changelog

** Please take a look at the above changelog as the API is subject to deprecations and other changes.

Release Notes

All releases and release notes are available on Github or the NuGet repository.

Developer Agreement

Review the Developer Program Agreement.

Acknowledgements

We would like to thank the following people for their contributions to this project:

About

Library that uses C# to connect to Smartsheet services.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 15

Morty Proxy This is a proxified and sanitized view of the page, visit original site.