Skip to product menu

Zoho Analytics has been recognized in the 2024 Gartner® Magic Quadrant™ for ABI PlatformsRead more

Skip to main content

Export View

To export the specified view in any of the following formats - CSV, PDF, Image, Excel, and HTML.

You can permit other users/viewers to customize their export options by enabling export configurations, which allows them to tailor the exports to their needs.

Function Call

ObjName.exportAsCSV(show_prompt)

ObjName.exportAsPDF(show_prompt)

ObjName.exportAsIMG(show_prompt)

ObjName.exportAsXLS(show_prompt)

ObjName.exportAsHTML(show_prompt)

Parameters

Paramter NameDescription
show_prompt (optional)

Boolean

true / false

This allows you to enable the export configuration for the specified view.

Sample Response

ZAnalytics JS API


 

Sample Code:

Copied<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>ZAnalytics JS API</title>
    <link rel="icon" type="image/x-icon" href="https://analytics.zoho.com/favicon.ico">
<script src="https://downloads.zohocdn.com/zanalyticslib/jsapi/v1/zanalytics.min.js"></script>
</head>
<style>
    input, button {
        background: #fff;
        border-radius: 3px;
        border: 1px solid #b8b8b8;
        height: 30px;
        margin: 5px;
    }
    input {
        width: 50px;
        padding-left: 10px;
    }
    button {
        cursor: pointer;
    }
</style>
<body>
    <div class="viewcontainer">
        <div class="row">
            <label>Show Export Dialogue</label><br>
            <button onclick="vizObj.exportAsCSV(true)">CSV</button>
            <button onclick="vizObj.exportAsPDF(true)">PDF</button>
            <button onclick="vizObj.exportAsIMG(true)">Image</button>
            <button onclick="vizObj.exportAsXLS(true)">Excel</button>
            <button onclick="vizObj.exportAsHTML(true)">HTML</button>
        </div><br>
        <div class="row">
            <label>Direct Dialogue</label><br>
            <button onclick="vizObj.exportAsCSV()">CSV</button>
            <button onclick="vizObj.exportAsPDF()">PDF</button>
            <button onclick="vizObj.exportAsIMG()">Image</button>
            <button onclick="vizObj.exportAsXLS()">Excel</button>
            <button onclick="vizObj.exportAsHTML()">HTML</button>
        </div>
        <div id="analysisView"></div>
        <script>
            const containerDiv = document.getElementById("analysisView");
            const url = "https://analytics.zoho.com/open-view/2588560000000010083";
            const options = {
                width: '100%',
                height: 600
            };
            const vizObj = new ZAnalyticsLib(containerDiv, url, options);
            vizObj.createViz();
        </script>
    </div>
</body>
</html>
Thanks for your interest. We shall get back to you shortly.