Excel çalışma sayfasında dizine göre şekil alma Bu REST API, Excel çalışma sayfasında resim formatına sahip bir şekil veya şekil bilgisi almayı belirtir.
RSET API
Copy
GET http://api.aspose.cloud/v3.0/cells/{ name} /worksheets/{ sheetName} /shapes/{ shapeindex}
İstek parametreleri şunlardır:
Parametre adı
Tip
Yol/Sorgu Dizesi/HTTPBody
Tanım
isim
sicim
yol
belge adı.
sayfaAdı
sicim
yol
çalışma sayfası adı.
şekil indeksi
tamsayı
yol
çalışma sayfası şekillerinde şekil dizini.
dosya
sicim
sorgu
Belgenin 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.
Request
Copy
curl -v "http://api.aspose.com/v3.0/cells/Sample_Test_Book.xls/worksheets/Sheet4/autoshapes/1" \
-X GET \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer <jwt token>"
Response
Copy
{
"Status" : "string" ,
"Shape" : {
"link" : {
"Href" : "string" ,
"Rel" : "string" ,
"Title" : "string" ,
"Type" : "string"
} ,
"Name" : "string" ,
"MsoDrawingType" : "string" ,
"AutoShapeType" : "string" ,
"Placement" : "string" ,
"UpperLeftRow" : 0,
"Top" : 0,
"UpperLeftColumn" : 0,
"Left" : 0,
"LowerRightRow" : 0,
"Bottom" : 0,
"LowerRightColumn" : 0,
"Right" : 0,
"Width" : 0,
"Height" : 0,
"X" : 0,
"Y" : 0,
"RotationAngle" : 0,
"HtmlText" : "string" ,
"Text" : "string" ,
"AlternativeText" : "string" ,
"TextHorizontalAlignment" : "string" ,
"TextHorizontalOverflow" : "string" ,
"TextOrientationType" : "string" ,
"TextVerticalAlignment" : "string" ,
"TextVerticalOverflow" : "string" ,
"IsGroup" : true ,
"IsHidden" : true ,
"IsLockAspectRatio" : true ,
"IsLocked" : true ,
"IsPrintable" : true ,
"IsTextWrapped" : true ,
"IsWordArt" : true ,
"LinkedCell" : "string" ,
"ZOrderPosition" : 0
}
}
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);
var request = new GetWorksheetShapeRequest(
name: remoteName,
sheetName:"Sheet1",
shapeindex:1,
folder: remoteFolder,
);
cellsApi.GetWorksheetShape(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);
GetWorksheetShapeRequest request = new GetWorksheetShapeRequest();
request.setName(remoteName);
request.setSheetName("Sheet6");
request.setShapeindex(0);
request.setFolder(remoteFolder);
request.setStorageName("");
ShapeResponse response = api.getWorksheetShape(request);
} catch (ApiException e) {
e.printStackTrace();
}catch (IOException e) {
e.printStackTrace();
}
}
}
Perl
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-perl/
use strict;
use warnings;
use utf8;
use File::Slurp;
use MIME::Base64;
use AsposeCellsCloud::CellsApi;
my $config = AsposeCellsCloud::Configuration->new( client_id => $ENV{'ProductClientId'}, client_secret => $ENV{'ProductClientSecret'});
my $instance = AsposeCellsCloud::CellsApi->new(AsposeCellsCloud::ApiClient->new( $config));
my $remoteFolder = 'TestData/In';
my $remoteName = 'Book1.xlsx';
my $request = AsposeCellsCloud::Request::GetWorksheetShapeRequest->new();
$request->{name} = $remoteName;
$request->{sheet_name} = 'Sheet1';
$request->{shapeindex} = 0;
$request->{folder} = $remoteFolder;
$request->{storage_name} = '';
my $result = $instance->get_worksheet_shape(request=> $request);
Go
Swift