Excel spreadsheet akeh digunakake kanggo panyimpenan lan analisis data, nanging bisa uga angel diakses lan dideleng kanthi online. Solusi kanggo masalah iki yaiku ngowahi spreadsheet Excel dadi tabel HTML, sing gampang diakses lan dideleng ing web. Kanthi Aspose.Cells Cloud, proses iki dadi luwih gampang lan luwih efisien. Ing artikel iki, kita bakal ngrembug babagan carane nggunakake Aspose.Cells Cloud kanggo ngowahi spreadsheet Excel dadi tabel HTML, lan njelajah keuntungan liyane saka nggunakake solusi iki kanggo syarat konversi. Apa sampeyan minangka pangembang utawa pangguna pungkasan, artikel iki dirancang kanggo nyedhiyakake informasi sing dibutuhake kanggo miwiti konversi Excel menyang HTML.
- Excel kanggo Web Konversi API
- Deleng Spreadsheet Online nggunakake C#
- Excel menyang HTML Online nggunakake Perintah cURL
Excel kanggo Web Konversi API
Seneng integrasi lancar, fitur canggih lan kemampuan konversi cepet saka Aspose.Cells Cloud. Iki minangka API berbasis awan sing nyedhiyakake solusi sing gampang lan efisien kanggo ngowahi spreadsheet Excel dadi tabel HTML. Ngonversi XLS lan XLSX menyang tabel HTML kanthi mung sawetara baris kode, ngilangi kabeh kabutuhan entri data manual lan mbebasake wektu kanggo tugas sing luwih penting. Dadi, apa sampeyan kudu nerbitake data kanthi online, bareng karo tim, utawa ngotomatisasi alur kerja, Aspose.Cells Cloud nyedhiyakake solusi sing fleksibel lan bisa diukur kanggo kabutuhan konversi Excel menyang HTML.
Saiki, miturut ruang lingkup artikel iki, kita kudu nambah referensi Aspose.Cells Cloud SDK kanggo .NET minangka paket NuGet ing solusi C# .NET. Telusuri “Aspose.Cells-Cloud” ing manajer paket NuGet lan tambahake paket kasebut.
Salajengipun, kanggo nggunakake kemampuan API, kita uga kudu duwe akun dashboard Cloud. Yen sampeyan durung langganan, gawe akun gratis liwat Cloud Dashboard nggunakake alamat email sing bener lan entuk kredensial klien pribadi sampeyan.
Deleng Spreadsheet Online nggunakake C#
Ayo dadi ngrembug langkah carane fitur spreadsheet online bisa rampung nggunakake C# .NET.
Gunakake link ing ngisor iki kanggo ngundhuh conto lembar kerja Excel (myDocument.xlsx) digunakake ing conto ing ndhuwur.
// Kanggo conto lengkap lan file data, bukak
https://github.com/aspose-cells-cloud/aspose-cells-cloud-dotnet/
// Entuk kredensial klien saka https://dashboard.aspose.cloud/
string clientSecret = "4d84d5f6584160cbd91dba1fe145db14";
string clientID = "bb959721-5780-4be6-be35-ff5c3a6aa4a2";
// nggawe conto CellsApi kanthi menehi rincian ClientID lan ClientSecret
CellsApi instance = new CellsApi(clientID, clientSecret);
// Input buku kerja Excel
string name = "myDocument.xlsx";
/
/ Format for resultant file
string format = "HTML";
// Jeneng file HTML asil
string resultantFile = "Converted.html";
try
{
// mbukak file saka drive sistem lokal
using (var file = System.IO.File.OpenRead(name))
{
// miwiti operasi konversi
var response = instance.CellsWorkbookPutConvertWorkbook(file, format: format, outPath: resultantFile);
// Pesen sukses yen konversi wis rampung
if (response != null && response.Equals("OK"))
{
Console.WriteLine("Excel to HTML Conversion successfull !");
Console.ReadKey();
}
}
catch (Exception ex)
{
Console.WriteLine("error:" + ex.Message + "\n" + ex.StackTrace);
}
Ayo ngerti potongan kode ing ndhuwur:
CellsApi instance = new CellsApi(clientID, clientSecret);
Nggawe obyek CellsApi ing ngendi kita ngliwati kredensial klien minangka argumen.
var file = System.IO.File.OpenRead(name)
Maca lembar kerja input Excel nggunakake metode OpenRead(…) saka kelas System.IO.File.
instance.CellsWorkbookPutConvertWorkbook(file, format: format, outPath: resultantFile);
Cara iki micu operasi konversi Excel menyang HTML lan nyimpen HTML asil ing panyimpenan Cloud.
Excel menyang HTML Online nggunakake Perintah cURL
Excel kanggo konversi HTML bisa digayuh nggunakake cURL printah, sing ngijini sampeyan kanggo sesambungan karo Aspose.Cells Cloud API lan nindakake macem-macem operasi, kalebu Excel kanggo konversi HTML. Mangkene conto prasaja babagan carane ngowahi spreadsheet Excel dadi HTML nggunakake perintah cURL:
- Unggah spreadsheet Excel menyang platform panyimpenan maya, kayata Google Drive utawa Dropbox.
- Entuk kunci API saka Aspose.Cells Cloud, sing bakal digunakake kanggo otentikasi panjaluk API sampeyan.
- Gawe token akses JWT adhedhasar kredensial klien nggunakake printah ing ngisor iki.
curl -v "https://api.aspose.cloud/connect/token" \
-X POST \
-d "grant_type=client_credentials&client_id=bb959721-5780-4be6-be35-ff5c3a6aa4a2&client_secret=4d84d5f6584160cbd91dba1fe145db14" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Accept: application/json"
- Saiki gunakake perintah cURL ing ngisor iki kanggo ngowahi spreadsheet Excel dadi HTML:
curl -v -X GET "https://api.aspose.cloud/v3.0/cells/myDocument(1).xlsx?format=HTML&isAutoFit=true&onlySaveTable=false&outPath=resultant.html&checkExcelRestriction=true" \
-H "accept: application/json" \
-H "authorization: Bearer <JWT Token>"
-
Sawise printah cURL dieksekusi, asil HTML disimpen ing panyimpenan maya.
-
Saiki, tinimbang panyimpenan maya, yen kita kudu nyimpen HTML menyang drive lokal, coba gunakake perintah cURL ing ngisor iki:
curl -v -X GET "https://api.aspose.cloud/v3.0/cells/myDocument(1).xlsx?format=HTML&isAutoFit=true&onlySaveTable=false&checkExcelRestriction=false" \
-H "accept: application/json" \
-H "authorization: Bearer <JWT Token>" \
-o "resultant.html"
Coba gunakake aplikasi Excel Converter gratis.
Panutup
Kesimpulane, ngowahi spreadsheet Excel dadi tabel HTML minangka tugas umum kanggo akeh bisnis lan organisasi, lan Aspose.Cells Cloud nyedhiyakake solusi sing kuat lan fleksibel kanggo kabutuhan. Kanthi nggunakake Aspose.Cells Cloud SDK kanggo .NET, sampeyan bisa ngowahi spreadsheet Excel menyang tabel HTML kanthi cepet lan gampang, kanthi mung sawetara baris kode. Kajaba iku, Aspose.Cells Cloud nawakake macem-macem fitur, kalebu dhukungan kanggo macem-macem basa pamrograman, integrasi karo platform panyimpenan awan sing populer, lan antarmuka sing ramah pangguna, dadi solusi sing cocog kanggo bisnis lan organisasi saka kabeh ukuran. Apa sampeyan kudu nerbitake data kanthi online, bareng karo tim, utawa ngotomatisasi alur kerja, Aspose.Cells Cloud nyedhiyakake solusi sing bisa dipercaya lan bisa diukur kanggo kabutuhan konversi Excel menyang HTML.
Disaranake uga njelajah Dokumentasi Produk, amarga ngemot koleksi topik sing nerangake fitur API liyane. Pungkasan, yen sampeyan nemoni masalah nalika nggunakake API, hubungi kita liwat [Forum Dhukungan Produk] gratis 9.
Artikel sing gegandhengan
Mangga bukak link ing ngisor iki kanggo mangerteni sing luwih lengkap babagan: