import { CellsApi,GetWorksheetPivotTablesRequest,UploadFileRequest } from "asposecellscloud"; var fs = require('fs'); var path = require('path'); var process = require('process'); const _ = require('asposecellscloud'); const cellsApi = new CellsApi(process.env.CellsCloudClientId, process.env.CellsCloudClientSecret); var remoteFolder = "TestData/In" var localPath = "TestData/CellsCloud/" var localName = "Book1.xlsx" var remoteName = "Book1.xlsx" describe('example', function(){ it("should call successfully" , function(){ var localNameRequest = new UploadFileRequest(); localNameRequest.uploadFiles ={localName:fs.createReadStream(localPath + localName)}; localNameRequest.path = remoteFolder + "/" + remoteName ; localNameRequest.storageName =""; cellsApi.uploadFile(localNameRequest ); var request = new GetWorksheetPivotTablesRequest(); request.name = remoteName; request.sheetName = "Sheet4"; request.folder = remoteFolder; request.storageName = ""; return cellsApi.getWorksheetPivotTables(request) }); });