Assembl Denna REST API indikerar till assembly
data i en Excel fil.
RSET API
Copy
POST https://api.aspose.cloud/v3.0/cells/assembly
Begärans parametrar är:
Parameternamn
Typ
Sökväg/Frågesträng/HTTPBody
Beskrivning
fil
fil
formData
Fil att ladda upp
datakälla
sträng
fråga
formatera
sträng
fråga
Xlsx
DeOpenAPI-specifikation definierar ett allmänt tillgängligt programmeringsgränssnitt och låter dig utföra REST-interaktioner direkt från en webbläsare.
Du kan använda cURL kommandoradsverktyg för att enkelt komma åt Aspose.Cells webbtjänster. Följande exempel visar hur man ringer till Cloud API med cURL.
Cloud SDK-familj
Att använda en SDK är det bästa sättet att påskynda utvecklingen. En SDK tar hand om detaljer på låg nivå och låter dig fokusera på dina projektuppgifter. Vänligen kolla inGitHub-förråd för en komplett lista med Aspose.Cells Cloud SDK.
Följande kodexempel visar hur man ringer till Aspose.Cells webbtjänster med olika SDK:er:
C#
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-cells-cloud/aspose-cells-cloud-dotnet/
namespace Aspose.Cells.Cloud.SDK.Example
{
using Aspose.Cells.Cloud.SDK.Api;
using Aspose.Cells.Cloud.SDK.Request;
using System;
using System.Collections.Generic;
using System.IO;
public partial class CellsApiExample
{
public void PostAssembleExample()
{
CellsApi cellsApi = new CellsApi(Environment.GetEnvironmentVariable("CellsCloudTestClientId"), Environment.GetEnvironmentVariable("CellsCloudTestClientSecret"));
IDictionary<string, Stream> mapFiles = new Dictionary<string, Stream>();
mapFiles.Add("assemblytest.xlsx", File.OpenRead(@"TestData\assemblytest.xlsx"));
mapFiles.Add("datasource.xlsx", File.OpenRead(@"TestData\datasource.xlsx"));
PostAssembleRequest request = new PostAssembleRequest(mapFiles,"ds","pdf");
cellsApi.PostAssemble(request);
}
}
}
Java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.aspose.cloud.cells.api;
import com.aspose.cloud.cells.client.*;
import com.aspose.cloud.cells.model.*;
import com.aspose.cloud.cells.request.*;
import java.io.IOException;
import org.junit.Test;
import java.util.ArrayList;
import java.util.List;
import java.io.File;
import java.util.HashMap;
public class Example {
private CellsApi api;
public Example(){
try {
api = new CellsApi(
System.getenv("CellsCloudClientId"),
System.getenv("CellsCloudClientSecret"),
"v3.0",
System.getenv("CellsCloudApiBaseUrl")
);
} catch (ApiException e) {
e.printStackTrace();
}
}
public void Run(){
try{
String remoteFolder = "TestData/In";
String localName = "Book1.xlsx";
String remoteName = "Book1.xlsx";
UploadFileRequest uploadFileRequest = new UploadFileRequest();
uploadFileRequest.setPath( remoteFolder + "/" + remoteName );
uploadFileRequest.setStorageName( "");
HashMap<String,File> files = new HashMap<String,File>();
files.put( localName , new File(localName ));
uploadFileRequest.setUploadFiles(files);
api.uploadFile(uploadFileRequest);
PostAssembleRequest request = new PostAssembleRequest();
request.setFile(remoteName);
request.setDatasource("ds");
request.setFormat("xlsx");
request.setPassword("");
request.setCheckExcelRestriction(false);
FilesResult response = api.postAssemble(request);
} catch (ApiException e) {
e.printStackTrace();
}catch (IOException e) {
e.printStackTrace();
}
}
}
PHP
Ruby
Node.js
Android
Perl
Go
Python