Ruft die Datei Excel in ein anderes Format ab Dieser REST API weist darauf hin, dass die Excel-Datei get
in eine Datei mit einem anderen Format umgewandelt wird.
Abfrageparameter
Parametername
Typ
Beschreibung
Format
Zeichenfolge
Dateiformat (csv/xls/html/mhtml/ods/pdf/xml/txt/tiff/xlsb/xlsm/xlsx/xltm/xltx/xps/png/jpg/gif/emf/bmp/md/Numbers/wmf/svg )
Passwort
Zeichenfolge
istAutoFit
Zeichenfolge
wahr falsch
onlySaveTable
Zeichenfolge
wahr falsch
outPath
Zeichenfolge
neue Dateiposition.
Ordner
Zeichenfolge
Originaler Arbeitsmappenordner.
Speichername
Zeichenfolge
Speichername.
REST API
API
Typ
Beschreibung
Swagger-Link
/cells/{name}
ERHALTEN
Exportiert die Arbeitsmappe in ein anderes Format.
GetWorkBook
DerOpenAPI-Spezifikation definiert eine öffentlich zugängliche Programmierschnittstelle und ermöglicht die Durchführung von REST-Interaktionen direkt über einen Webbrowser.
Sie können verwendencURL Befehlszeilentool für den einfachen Zugriff auf Aspose.Cells-Webdienste. Das folgende Beispiel zeigt, wie Sie die Cloud API mit cURL anrufen.
Cloud SDK-Familie
Die Verwendung eines SDK ist der beste Weg, 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 schauen Sie sich die anGitHub-Repository Eine vollständige Liste der Aspose.Cells Cloud SDKs finden Sie hier.
Die folgenden Codebeispiele veranschaulichen, wie Aspose.Cells-Webdienste mithilfe verschiedener SDKs aufgerufen werden:
C#
// For complete examples and data files, please go to https://github.com/aspose-cells-cloud/aspose-cells-cloud-dotnet/
Aspose . Cells . Cloud . SDK . Api . LightCellsApi LightCellsApi = new Aspose . Cells . Cloud . SDK . Api . LightCellsApi ( "your client id" , "your client secret" );
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" ));
Aspose . Cells . Cloud . SDK . Model . FilesResult filesResult = LightCellsApi . PostExport ( files , "Workbook" , "pdf" );
Assert . IsNotNull ( filesResult );
Java
// For complete examples and data files, please go to https://github.com/aspose-cells-cloud/aspose-cells-cloud-java/
try {
LightCellsApi liteApi = new LightCellsApi ( System . getenv ( "CellsCloudTestClientId" ), System . getenv ( "CellsCloudTestClientSecret" ));
String AssemblyTestXlsx = "assemblytest.xlsx" ;
String DataSourceXlsx = "datasource.xlsx" ;
HashMap < String , File > fileMap = new HashMap < String , File >();
fileMap . put ( AssemblyTestXlsx , new File ( "TestData\\" + AssemblyTestXlsx ));
fileMap . put ( DataSourceXlsx , new File ( "TestData\\" + DataSourceXlsx ) );
FilesResult response = liteApi . postExport ( fileMap , "workbook" , "pdf" );
} catch ( ApiException e ) {
e . printStackTrace ();
}
Go
// For complete examples and data files, please go to https://github.com/aspose-cells-cloud/aspose-cells-cloud-go/
LightCellsAPI := NewLightCellsApiService ( clientId , clientSecret )
var fileMap map [ string ] string
fileMap = make ( map [ string ] string )
fileMap [ "Book1.xlsx" ] = "TestData\\Book1.xlsx"
fileMap [ "Book2.xlsx" ] = "TestData\\Book2.xlsx"
postOpts := new ( PostExportOpts )
postOpts . Format = "pdf"
postOpts . ObjectType = "workbook"
_ , httpResponse , err := LightCellsAPI . PostExport ( fileMap , postOpts )
if err != nil {
t . Error ( err )
} else if httpResponse . StatusCode < 200 || httpResponse . StatusCode > 299 {
t . Fail ()
} else {
fmt . Printf ( "\tTestCellsPostExport \n" )
}