namespace Aspose.Cells.Cloud.SDK.Tests.Api.Example { using Microsoft.VisualStudio.TestTools.UnitTesting; using Aspose.Cells.Cloud.SDK.Request; using System.Collections.Generic; using Aspose.Cells.Cloud.SDK.Api; using System; using System.IO; [TestClass] public class CellsApiExample { CellsApi cellsApi = new CellsApi(Environment.GetEnvironmentVariable("CellsCloudTestClientId"), Environment.GetEnvironmentVariable("CellsCloudTestClientSecret")); private readonly string remoteFolder = "TestData/In"; string localName = "Book1.xlsx"; string remoteName = "remote_book1.xlsx"; string localPath = "D:/TestData/CellsCloud"; [TestCategory("Cells")] [TestMethod] public void GetWorksheetAutoFilter() { UploadFileRequest uploadFileRequest = new UploadFileRequest(); FileInfo fileInfo = new FileInfo(localPath + "/" + localName); uploadFileRequest.path = remoteFolder + "/" + remoteName; uploadFileRequest.storageName = ""; uploadFileRequest.UploadFiles = new Dictionary<string, Stream>() { { localName, File.OpenRead(localPath +"/"+ localName) } }; cellsApi.UploadFile(uploadFileRequest); var request = new DeleteWorksheetPivotTableFilterRequest( name: remoteName, sheetName: "Sheet3", pivotTableIndex: 0, fieldIndex: 0, needReCalculate: true, folder: remoteFolder, storageName: "" ); cellsApi.DeleteWorksheetPivotTableFilter(request); } } }