Smartsheet.Api.Internal.SheetResourcesImpl.CopySheet C# (CSharp) Method

CopySheet() public method

Creates a copy of the specified Sheet.

It mirrors To the following Smartsheet REST API method:
POST /sheets/{sheetId}/copy

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 CopySheet ( long sheetId, ContainerDestination destination, IEnumerable include ) : Api.Models.Sheet
sheetId long the sheet Id
destination Smartsheet.Api.Models.ContainerDestination the destination to copy to
include IEnumerable the elements to copy. Note: Cell history will not be copied, regardless of which include parameter values are specified.
return Api.Models.Sheet
        public virtual Sheet CopySheet(long sheetId, ContainerDestination destination, IEnumerable<SheetCopyInclusion> include)
        {
            IDictionary<string, string> parameters = new Dictionary<string, string>();
            if (include != null)
            {
                parameters.Add("include", QueryUtil.GenerateCommaSeparatedList(include));
            }
            return this.CreateResource<RequestResult<Sheet>, ContainerDestination>(QueryUtil.GenerateUrl("sheets/" + sheetId + "/copy", parameters), destination).Result;
        }