Excel إلى Jso يشير هذا REST API إلى convert
ملف جدول بيانات إلى ملف بتنسيق json.
معلمة الاستعلام
اسم المعلمة
يكتب
وصف
كلمة المرور
خيط
كلمة المرور المطلوبة لفتح الملف Excel.
اسم التخزين
خيط
اسم التخزين الذي يوجد فيه الملف.
التحقق من قيود Excel
منطقي
ما إذا كان يتم التحقق من تقييد ملف Excel عندما يقوم المستخدم بتعديل الكائنات المرتبطة بالخلايا.
معلمة نص الطلب
اسم المعلمة
يكتب
وصف
ملف البيانات
ملف البيانات
يتم حفظ ملف البيانات في الجزء الأول من المحتوى المتعدد الأجزاء.
إجابة
معلومات الملف
مواصفات REST API
المواصفات OpenAPI يحدد واجهة برمجة يمكن الوصول إليها بشكل عام ويسمح لك بتنفيذ تفاعلات REST مباشرة من متصفح الويب.
يمكنك استخدامcURL أداة سطر أوامر للوصول بسهولة إلى خدمات الويب Aspose.Cells. يوضح المثال التالي كيفية إجراء مكالمات إلى Cloud API باستخدام cURL.
عائلة SDK السحابية
يُعد استخدام حزمة تطوير برمجيات (SDK) أفضل طريقة لتسريع عملية التطوير. فهي تُعنى بالتفاصيل البسيطة وتُتيح لك التركيز على مهام مشروعك. يُرجى الاطلاع علىمستودع GitHub للحصول على قائمة كاملة بـ Aspose.Cells Cloud SDKs.
توضح أمثلة التعليمات البرمجية التالية كيفية إجراء مكالمات إلى خدمات الويب Aspose.Cells باستخدام مجموعات أدوات تطوير البرامج المختلفة:
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
تنفذ واجهات برمجة التطبيقات الأخرى هذه الوظيفة
POST /cells/{name}/saveAs يتيح لك API حفظ ملف MS Excel كملف HTML مع إعدادات إضافية وحفظ النتيجة في وحدة التخزين.
هذا الملف REST API convert
excel إلى HTML.
ضع /الخلايا/تحويل يتيح لك API تحويل ملف MS Excel إلى ملف HTML بإعدادات إضافية وحفظ النتيجة في الاستجابة.
هذا الملف REST API export
excel إلى HTML.
احصل على /cells/{name} يتيح لك API تحويل ملف MS Excel إلى ملف HTML بإعدادات إضافية وحفظ النتيجة في الاستجابة.