const { CellsApi, UploadFileRequest, CellsCharts_GetWorksheetChartRequest } = require("asposecellscloud"); const clientId = process.env.CellsCloudClientId; const clientSecret = process.env.CellsCloudClientSecret; const ApiURL = process.env.CellsCloudApiBaseUrl; const fs = require('fs'); const path = require('path'); const cellsApi = new CellsApi(clientId, clientSecret,"v3.0",ApiURL); const localPath = "D:/aspose-cells-cloud-node/TestData/" const filename = "myDocument.xlsx"; const data =fs.createReadStream(path.join(localPath, filename)); const req = new UploadFileRequest({ path: "Temp/" + filename, file: data }); cellsApi.uploadFile(req) .then((result) => { const req = new CellsCharts_GetWorksheetChartRequest(); req.name = filename; req.sheetName = "Sheet3"; req.chartNumber = 0; req.format = "png"; req.folder = "Temp"; cellsApi.cellsChartsGetWorksheetChart(req) .then((result) => { console.log("successful") }).catch((error) => { console.error('Unhandled Promise Rejection:', error); }) })