HTML JPG PDF XML DOCX
  Product Family
PDF

Konversi PDF ke XLSX dalam Node.js SDK

Ekspor dokumen PDF ke berbagai format termasuk XLSX dengan Aspose.PDF Cloud Node.js SDK

Get Started

Cara Mengonversi PDF ke XLSX Menggunakan Node.js SDK

Untuk mengonversi PDF ke XLSX, kita akan menggunakan Aspose.PDF Cloud Node.js SDK Cloud SDK ini membantu para pemrogram Node.js dalam mengembangkan aplikasi pembuat, anotator, editor, dan konverter PDF berbasis cloud menggunakan bahasa pemrograman Node.js melalui Aspose.PDF REST API. Buka NPM pengelola paket, cari Aspose.PDF Cloud, dan instal. Anda juga dapat menggunakan perintah berikut dari Konsol Pengelola Paket.

Perintah Konsol Pengelola Paket


     
    npm install asposepdfcloud --save
     
     

Langkah-langkah untuk Mengonversi PDF ke XLSX melalui Node.js

Pengembang Aspose.PDF Cloud Node.js dapat dengan mudah memuat & mengonversi file PDF ke XLSX hanya dalam beberapa baris kode.

  1. Muat Aplikasi Rahasia dan Kunci Anda dari file JSON atau tetapkan kredensial dengan cara lain
  2. Buat objek untuk menghubungkan ke API Cloud
  3. Unggah file dokumen Anda
  4. Lakukan konversi menggunakan etPdfInStorageToXlsx
  5. Unduh hasilnya jika diperlukan
 

Kode Contoh ini Menunjukkan Konversi PDF ke XLSX Cloud Node.js SDK


    const fs = require("fs");
    const credentials = require("./credentials.json");
    const { PdfApi } = require("asposepdfcloud");

    // Load your Application Secret and Key from the JSON file or set credentials in another way
    async function convertPDFtoXLSX() {
        const localFileName = "C:\\Samples\\sample.pdf";
        const storageFileName = "sample.pdf";
        const pdfApi = new PdfApi(credentials.id, credentials.key);
        let fileData = await fs.readFile(localImageFileName);
        try {
            let uploadResult = await pdfApi.uploadFile(storageFileName, fileData);
            console.log(uploadResult.response.text);
        }
        catch (error) {
            console.error(error.response.text);
        }

        try {
            let convertResult = await pdfApi.getPdfInStorageToXlsx(storageFileName);
            fs.writeFileSync("sample.xlx", convertResult.body);
            const buffer = await pdfApi.downloadFile(STORAGE_FILENAME);
        } catch (error) {
            console.error(error.response.text);
        }
    }
 
  • Konversi Lain yang Didukung

    Anda juga dapat mengonversi PDF ke banyak format file lainnya termasuk beberapa yang tercantum di bawah ini.

    BMP KE PDF (Gambar Bitmap)
    CGM KE PDF (Format Biner Microsoft Word)
    EMF KE PDF (Dokumen Kata Office 2007+)
    EPUB KE PDF (Format Metafile yang Ditingkatkan)
    GIF KE PDF (Format Pertukaran Grafis)
    HTML KE PDF (Bahasa Markup Hyper Text)
    JPEG KE PDF (Kelompok Ahli Fotografi Bersama)
    LATEX KE PDF (Teks Keluaran LaTeX)
    PCL KE PDF (Bahasa Perintah Printer)
    MD KE PDF (Markdown)
    PDF KE BMP (Gambar Bitmap)
    PDF KE EPUB (Format E-book)
    PDF KE GIF (Format Pertukaran Grafis)
    PDF KE HTML (Hyper Text Markup Language)
    PDF KE JPEG (Joint Photographic Experts Group)
    PDF KE PDF/A (Portable Document Format)
    PDF KE PNG (Portable Network Graphics)
    PDF KE PPTX (Microsoft PowerPoint)
    PDF KE SVG (Scalable Vector Graphics)
    PDF KE TEX (Computer Graphics System)
    PDF KE TIFF (Tagged Image Format)
    PDF KE WORD (Microsoft Word Binary Format)
    PDF KE XLSX (Microsoft Excel Open XML Format Spreadsheet file)
    PDF KE XPS (XML Paper Specifications)
    PNG KE PDF (Portable Network Graphics)
    PS KE PDF (PostScript)
    SVG KE PDF (Scalable Vector Graphics)
    TEKS KE PDF (Text Document)
    TIFF KE PDF (Tagged Image Format)
    XPS KE PDF (XML Paper Specifications)