Excel Jso'ya Bu REST API, convert
‘e bir elektronik tablo dosyasının json formatlı bir dosyaya dönüştürüldüğünü gösterir.
Sorgu Parametresi
Parametre Adı
Tip
Tanım
şifre
sicim
Excel dosyasını açmak için gereken şifre.
depolamaAdı
sicim
Dosyanın bulunduğu depolama adı.
checkExcelKısıtlama
bool
Kullanıcı hücrelerle ilgili nesneleri değiştirdiğinde Excel dosyasının kısıtlamasını kontrol edin.
İstek Gövde Parametresi
Parametre Adı
Tip
Tanım
veri dosyası
veri dosyası
Veri dosyası çok parçalı içeriğin ilk bölümüne kaydedilir.
Cevap
Dosya bilgisi
REST API Şartname
API
Tip
Tanım
Swagger Bağlantısı
/hücreler/dönüştür/json
POSTALAMAK
Bir elektronik tabloyu pptx dosyasına dönüştürün.
PostConvertWorkbookToJson
TheOpenAPI 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.
KullanabilirsinizcURL Aspose.Cells web servislerine kolayca erişmek için komut satırı aracı. Aşağıdaki örnek, cURL ile Cloud API’e nasıl çağrı yapılacağını gösterir.
Bulut SDK Ailesi
Bir SDK kullanmak, geliştirmeyi hızlandırmanın en iyi yoludur. Bir SDK, düşük seviyeli ayrıntılarla ilgilenir ve proje görevlerinize odaklanmanızı sağlar. 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 servislerine nasıl çağrı yapılacağını göstermektedir:
C#
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
namespace Aspose.Cells.Cloud.SDK.Api.ExampleQuickstart
{
using System;
using System.IO;
using System.Collections.Generic;
using Aspose.Cells.Cloud.SDK.Api;
using Aspose.Cells.Cloud.SDK.Model;
using Aspose.Cells.Cloud.SDK.Request;
public class CellsApiExample
{
string CellsCloudClientId ="....";//get from https://dashboard.aspose.cloud/#/applications
string CellsCloudClientSecret="...";//get from https://dashboard.aspose.cloud/#/applications
CellsApi cellsApi = new CellsApi(CellsCloudClientId, CellsCloudClientSecret);
string localName = "Book1.xlsx";
string localPath = @"D:\TestData\CellsCloud";
string outputFilePath = @"D:\Outpath\result.json";
public void ExamplePostConvertWorkbookToJson()
{
string inputPath = Path.Combine(localPath, localName);
using (var inputFile = File.OpenRead(inputPath))
{
var mapFiles = new Dictionary<string, Stream> { [localName] = inputFile };
var request = new PostConvertWorkbookToJsonRequest { File = mapFiles };
var response = cellsApi.PostConvertWorkbookToJson(request);
byte[] fileBytes = Convert.FromBase64String(response.FileContent);
File.WriteAllBytes(outputFilePath, fileBytes);
}
}
}
}
Java
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
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 java.util.ArrayList;
import java.util.List;
import java.io.File;
import java.util.HashMap;
import java.io.InputStream;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
public class ExapmlePostConvertWorkbookToJson {
private CellsApi api;
public ExapmleQuickstart(){
try {
String CellsCloudClientId ="....";//get from https://dashboard.aspose.cloud/#/applications
String CellsCloudClientSecret="...";//get from https://dashboard.aspose.cloud/#/applications
api = new CellsApi(CellsCloudClientId, CellsCloudClientSecret);
} catch (ApiException e) {
e.printStackTrace();
}
}
public void PostConvertWorkbookToJson(){
try{
String localName = "Book1.xlsx";
String localPath = "D:/TestData/CellsCloud";
String outputFilePath ="D:/Outpath/result.json";
PostConvertWorkbookToJsonRequest request = new PostConvertWorkbookToJsonRequest();
File inputFile = new File(localPath, localName);
Map<String, File> fileMap = new HashMap<>();
fileMap.put(localName, inputFile);
request.setfile(fileMap);
FileInfo resultFile = this.api.postConvertWorkbookToJson(request);
yte[] pdfBytes = Base64.getDecoder().decode(resultFile.getFileContent());
Files.write(Paths.get(outputPath), pdfBytes);
} catch (ApiException e) {
e.printStackTrace();
}catch (IOException e) {
e.printStackTrace();
}
}
}
PHP
Ruby
Node.js
Python
Perl
Go
Diğer API’ler bu işlevi uygular
POST /hücreler/{isim}/kaydet API, MS Excel dosyasını ek ayarlarla HTML dosyası olarak kaydetmenizi ve sonucu depolama alanına kaydetmenizi sağlar.
Bu REST API convert
excel dosyasını HTML’e kopyalayın.
PUT /hücreler/dönüştür API, MS Excel dosyasını ek ayarlarla HTML dosyasına dönüştürmenizi ve sonucu yanıta kaydetmenizi sağlar.
Bu REST API export
excel dosyasını HTML’e kopyalayın.
GET /hücreler/{isim} API, MS Excel dosyasını ek ayarlarla HTML dosyasına dönüştürmenizi ve sonucu yanıta kaydetmenizi sağlar.