Smartsheet.Api.Internal.WorkspaceSheetResourcesImpl.CreateSheetFromTemplate C# (CSharp) Method

CreateSheetFromTemplate() public method

Creates a Sheet at the top-level of the specified Workspace, from the specified Template.

It mirrors To the following Smartsheet REST API method: POST /workspaces/{workspaceId}/Sheets

if any argument is null or empty string if there is any problem with the REST API request if there is any problem with the REST API authorization (access token) if the resource cannot be found if the REST API service is not available (possibly due To rate limiting) if there is any other error during the operation
public CreateSheetFromTemplate ( long workspaceId, Sheet sheet, IEnumerable includes ) : Sheet
workspaceId long the workspace Id
sheet Sheet the sheet To create
includes IEnumerable used To specify the optional objects To include
return Sheet
        public virtual Sheet CreateSheetFromTemplate(long workspaceId, Sheet sheet, IEnumerable<TemplateInclusion> includes)
        {
            StringBuilder path = new StringBuilder("workspaces/" + workspaceId + "/sheets");
            if (includes != null)
            {
                path.Append("?include=" + QueryUtil.GenerateCommaSeparatedList(includes));
            }
            return this.CreateResource(path.ToString(), typeof(Sheet), sheet);
        }