Excel çalışma kutusu için dijital imza ekleyin Bu REST API, Excel çalışma kitabına digital signature
eklenmesi gerektiğini belirtir.
RSET API
Copy
POST http://api.aspose.cloud/v3.0/cells/{ name} /digitalsignature
İstek parametreleri şunlardır:
Parametre adı
Tip
Yol/Sorgu Dizesi/HTTPBody
Tanım
isim
sicim
yol
Çalışma kitabı adı.
dijital imza dosyası
sicim
sorgu
Dijital imza dosyası parametreleri.
şifre
sicim
sorgu
dosya
sicim
sorgu
Çalışma kitabının klasörü.
depolamaAdı
sicim
sorgu
depolama adı.
OpenAPI Spesifikasyonu herkese açık bir programlama arayüzü tanımlar ve REST etkileşimlerini doğrudan bir web tarayıcısından gerçekleştirmenize olanak tanır.
Aspose.Cells web servislerine kolayca erişmek için cURL komut satırı aracını kullanabilirsiniz. Aşağıdaki örnekte, cURL ile Cloud API’e nasıl çağrı yapılacağı gösterilmektedir.
Bulut SDK Ailesi
SDK kullanmak, geliştirmeyi hızlandırmanın en iyi yoludur. Bir SDK, düşük düzeyli ayrıntılarla ilgilenir ve proje görevlerinize odaklanmanıza olanak tanır. Lütfen şuraya göz atın:GitHub deposu Aspose.Cells Bulut SDK’larının tam listesi için.
Aşağıdaki kod örnekleri, çeşitli SDK’ları kullanarak Aspose.Cells web hizmetlerine nasıl çağrı yapılacağını gösterir:
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
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 Example()
{
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);
PostDigitalSignatureRequest request = new PostDigitalSignatureRequest { name = remoteName, digitalsignaturefile = "DigitalSignature.pfx", password = "123456", folder = remoteFolder };
cellsApi.PostDigitalSignature(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);
PostProtectWorkbookRequest request = new PostProtectWorkbookRequest();
request.setName(remoteName);
request.setProtectWorkbookRequest(protection);
request.setFolder(remoteFolder);
request.setStorageName("");
CellsCloudResponse response = api.postProtectWorkbook(request);
} catch (ApiException e) {
e.printStackTrace();
}catch (IOException e) {
e.printStackTrace();
}
}
}
PHP
Ruby
Node.js
Android
Perl
Go
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 main
import (
"os"
. "github.com/aspose-cells-cloud/aspose-cells-cloud-go/v25"
)
func main() {
instance := NewCellsApiService(os.Getenv("ProductClientId"), os.Getenv("ProductClientSecret"))
requestOpts := new(PostDigitalSignatureRequest)
requestOpts.Digitalsignaturefile = "roywang.pfx"
requestOpts.Folder = "CellsTests"
requestOpts.Name = "Book1.xlsx"
requestOpts.Password = "123456"
_, _, err := instance.PostDigitalSignature(requestOpts)
if err != nil {
return
}
}
Python