Holen Sie sich eine AutoForm aus einem Excel-Arbeitsblatt Dieser REST API zeigt get autoshape info
an.
RSET API
Copy
GET http://api.aspose.cloud/v3.0/cells/{ name} /worksheets/{ sheetName} /autoshapes/{ autoshapeNumber}
Die Anforderungsparameter sind:
Parametername
Typ
Pfad/Abfragezeichenfolge/HTTPBody
Beschreibung
Name
Schnur
Weg
Dokumentname.
Blattname
Schnur
Weg
Arbeitsblattname.
autoshapeNummer
ganze Zahl
Weg
Die AutoShape-Nummer.
Format
Schnur
Abfrage
Exportiertes Format.
Ordner
Schnur
Abfrage
Der Dokumentordner.
Speichername
Schnur
Abfrage
Speichername.
DerOpenAPI-Spezifikation definiert eine öffentlich zugängliche Programmierschnittstelle und ermöglicht Ihnen, REST-Interaktionen direkt von einem Webbrowser aus durchzuführen.
Mit dem Befehlszeilentool cURL können Sie ganz einfach auf die Webdienste Aspose.Cells zugreifen. Das folgende Beispiel zeigt, wie Sie mit cURL Anrufe an Cloud API tätigen.
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 {
"AutoShape" : {
"Name" : "AutoShape 2" ,
"MsoDrawingType" : "CellsDrawing" ,
"AutoShapeType" : "FlowChartDocument" ,
"Placement" : "FreeFloating" ,
"UpperLeftRow" : 7,
"Top" : 6,
"UpperLeftColumn" : 5,
"Left" : 0,
"LowerRightRow" : 10,
"Bottom" : 0,
"LowerRightColumn" : 11,
"Right" : 0,
"Width" : 102,
"Height" : 45,
"X" : 85,
"Y" : 129,
"RotationAngle" : 0.0,
"HtmlText" : "<Font Style=\"FONT-FAMILY: Tahoma;FONT-SIZE: 10pt;COLOR: #000000;TEXT-ALIGN: center;\">Body</Font>" ,
"Text" : "Body" ,
"AlternativeText" : "" ,
"TextHorizontalAlignment" : "Center" ,
"TextHorizontalOverflow" : "Overflow" ,
"TextOrientationType" : "NoRotation" ,
"TextVerticalAlignment" : "Center" ,
"TextVerticalOverflow" : "Overflow" ,
"IsGroup" : false ,
"IsHidden" : false ,
"IsLockAspectRatio" : false ,
"IsLocked" : false ,
"IsPrintable" : false ,
"IsTextWrapped" : false ,
"IsWordArt" : false ,
"ZOrderPosition" : 1,
"link" : {
"Href" : "http://api.aspose.cloud/v1.1/cells/Sample_Test_Book.xls/worksheets/Sheet4/shapes/1" ,
"Rel" : "self"
}
} ,
"Code" : "200" ,
"Status" : "OK"
}
Cloud SDK-Familie
Die Verwendung eines SDK ist der beste Weg, um die Entwicklung zu beschleunigen. Ein SDK kümmert sich um Details auf niedriger Ebene und ermöglicht es Ihnen, sich auf Ihre Projektaufgaben zu konzentrieren. Bitte lesen Sie dieGitHub-Repository für eine vollständige Liste der Aspose.Cells Cloud SDKs.
Die folgenden Codebeispiele zeigen, wie Sie mit verschiedenen SDKs Aufrufe an die Webdienste Aspose.Cells tätigen:
C#
View raw
(Sorry about that, but we can’t show files that are this big right now.)
Java
View raw
(Sorry about that, but we can’t show files that are this big right now.)
PHP
This file contains hidden or 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
<?php
# For complete examples and data files, please go to https://github.com/aspose-cells-cloud/aspose-cells-cloud-php
require_once('vendor\autoload.php');
use \Aspose\Cells\Cloud\Api\CellsApi;
use \Aspose\Cells\Cloud\Request\GetWorksheetChartLegendRequest;
class Worksheet {
public $instance;
public function __construct() {
$this->instance = new CellsApi(getenv("CellsCloudClientId"),getenv("CellsCloudClientSecret"),"v3.0",getenv("CellsCloudApiBaseUrl"));
}
public function getWorksheetAutoshape() {
$name ='myDocument.xlsx';
$sheet_name ='Sheet2';
$autoshapeNumber = 4;
$folder = "TestData/In";
$result = $this->instance->cellsAutoshapesGetWorksheetAutoshape($name, $sheet_name,$autoshapeNumber, null, $folder);
$json = json_decode($result);
$this->assertEquals(200, $json->Code);
}
}
$worksheet = new Worksheet();
$worksheet->getWorksheetAutoshape();
?>
Ruby
This file contains hidden or 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-ruby
require 'aspose_cells_cloud'
class Worksheet
include AsposeCellsCloud
def initialize
#Get client_id and client_secret from https://cloud.aspose.com
@instance = AsposeCellsCloud::CellsApi.new($client_id,$client_secret,$api_version,$baseurl)
end
# Get autoshape info.
def get_autoshape_info
name = $MYDOC
sheet_name = $SHEET2
autoshape_number = 4
format = 'PNG'
folder = $TEMPFOLDER
result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
expect(result.uploaded.size).to be > 0
result = @instance.cells_autoshapes_get_worksheet_autoshape(name, sheet_name, autoshape_number, { :format=>format,:folder=>folder})
end
end
worksheet = Worksheet.new()
puts worksheet.get_autoshape_info
Python
This file contains hidden or 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-python
import os
import sys
import asposecellscloud
from asposecellscloud.apis.cells_api import CellsApi
api = asposecellscloud.apis.cells_api.CellsApi(os.getenv('CellsCloudClientId'),os.getenv('CellsCloudClientSecret'),"v3.0",os.getenv('CellsCloudApiBaseUrl'))
result = api.upload_file(folder + '/' + name, "c:/TestData/" + name)
result = api.cells_autoshapes_get_worksheet_autoshape('myDocument.xlsx', 'Sheet2',4, folder='PythonTest')
Node.js
This file contains hidden or 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
const { CellsApi, UploadFileRequest, CellsAutoshapes_GetWorksheetAutoshapeRequest } = 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 = "Book1.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 CellsAutoshapes_GetWorksheetAutoshapeRequest();
req.name = filename;
req.sheetName = "Sheet2";
req.autoshapeNumber = 4;
req.folder = "Temp";
cellsApi.cellsAutoshapesGetWorksheetAutoshape(req)
.then((result) => {
console.log("successful")
}).catch((error) => {
console.error('Unhandled Promise Rejection:', error);
})
})
Android
Swift
Perl
This file contains hidden or 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 $result =undef;
my $BOOK1 = 'Book1.xlsx';
my $MYDOC = 'myDocument.xlsx';
my $PVTESTFILE = 'TestCase.xlsx';
my $TEMPFOLDER = 'PerlTest';
my $SHEET1 = 'Sheet1';
my $SHEET2 = 'Sheet2';
my $SHEET3 = 'Sheet3';
my $SHEET4 = 'Sheet4';
my $SHEET5 = 'Sheet5';
my $SHEET6 = 'Sheet6';
my $SHEET7 = 'Sheet7';
my $SHEET8 = 'Sheet8';
my $CELLNAME = 'A1';
my $RANGE = 'A1:C10';
my $CELLAREA = 'A1:C10';
my $api = get_client();
my $name = $MYDOC; # replace NULL with a proper value
my $sheet_name = $SHEET2; # replace NULL with a proper value
my $autoshape_number = 4; # replace NULL with a proper value
my $folder = $TEMPFOLDER; # replace NULL with a proper value
my $format = 'png';
ready_file('api'=> $api, 'file'=>$name ,'folder' =>$folder) ;
$result = $api->cells_autoshapes_get_worksheet_autoshape(name => $name, sheet_name => $sheet_name, autoshape_number => $autoshape_number, format => $format ,folder => $folder);
Go