How to Convert Excel to PDF in jQuery for Excel to PDF API in JavaScript using Web API

Learn How to Convert Excel to PDF in jQuery to Have Excel to PDF API in JavaScript

The documentation is designed to help you to implement the features on your side. Web API was made to help with excel to PDF API in JavaScript. Web API is the REST API that provides set of data extraction functions, and tools for document manipulation, splitting and merging of PDF files. Includes built-in OCR, images recognition, can generate and read barcodes from images, scans, and PDF.

JavaScript code snippet like this for Web API works best when you need to quickly implement excel to PDF API in your JavaScript application. For the implementation of this functionality, please copy and paste code below into your app using code editor. Then compile and run your app. Writing JavaScript application typically includes multiple stages of the software development so even if the functionality works please test it with your data and the production environment.

Our website provides free trial version of Web API that includes source code samples to help with your JavaScript project.

On-demand (REST Web API) version:
 Web API (on-demand version)

On-premise offline SDK for Windows:
 60 Day Free Trial (on-premise)


$(document).ready(function () {
    $("#result").attr("href", '').html('');

$(document).on("click", "#submit", function () {
    $("#inlineOutput").text(''); // inline output div
    $("#status").text(''); // status div

    var apiKey = $("#apiKey").val().trim(); //Get your API key at

    var formData = $("#form input[type=file]")[0].files[0]; // file to upload
    var toType = $("#convertType").val(); // output type
    var isInline = $("#outputType").val() == "inline"; // if we need output as inline content or link to output file

    $("#status").html('Requesting presigned url for upload... &nbsp;&nbsp;&nbsp; <img src="ajax-loader.gif" />');

        url: `${$("#inputFile").val().split('.').pop().toLowerCase()}&encrypt=true`,
        type: 'GET',
        headers: { 'x-api-key': apiKey }, // passing our api key
        success: function (result) {

            if (result['error'] === false) {
                var presignedUrl = result['presignedUrl']; // reading provided presigned url to put our content into
                var accessUrl = result['url']; // reading output url that will indicate uploaded file

                $("#status").html('Uploading... &nbsp;&nbsp;&nbsp; <img src="ajax-loader.gif" />');

                    url: presignedUrl, // no api key is required to upload file
                    type: 'PUT',
                    data: formData,
                    processData: false,
                    success: function () {

                        $("#status").html('Processing... &nbsp;&nbsp;&nbsp; <img src="ajax-loader.gif" />');
                            url: '' + toType,
                            type: 'POST',
                            headers: { 'x-api-key': apiKey, "Content-Type": "application/json" },
                            data: JSON.stringify({
                                "url": accessUrl,
                                "encrypt": true,
                                "inline": isInline
                            success: function (result) {

                                $("#status").text('done converting.');

                                // console.log(JSON.stringify(result));


                                if (isInline) {
                                else {
                                    $("#result").attr("href", result['url']).html(result['url']);


                    error: function () {





Get 60 Day Free Trial

See also:


Get Your API Key

See also: