Sourcetable Integration

Export Plotly data to CSV

Jump to


    Welcome to the comprehensive guide on exporting Plotly data to CSV. Plotly, a powerful tool for creating interactive graphs, offers users the ability to export their data into the versatile CSV format. CSV files are not only human-readable and lightweight, making them ideal for data analysis in Python, but they are also widely supported across various programming languages and tools, allowing for seamless integration into spreadsheets for further manipulation and visualization. On this page, we'll explore what Plotly data is, the straightforward methods to export it to a CSV file, including an API call and the right-click context menu for enterprise users, and practical use cases for this functionality. Additionally, we'll introduce Sourcetable as an alternative approach to CSV exports for Plotly data, and provide a helpful Q&A section to address common inquiries about the process.

    What is Plotly Data?

    Plotly is a multifaceted platform that provides tools for creating, scaling, and deploying interactive data applications. It is widely recognized in the open-source community, amassing over 97,000 GitHub stars for its repositories. The platform's popularity is further evidenced by the substantial download figures, with more than 16.5 million monthly downloads of its open-source libraries, contributing to a total of over 586 million downloads.

    The core of Plotly's offerings is its open-source graphing library, which supports Python-based charting and a variety of chart types. Users can create a range of visualizations, from scientific charts and 3D graphs to statistical charts, catering to diverse data presentation needs. Founded by a team including Alex Johnson, Jack Parmer, Chris Parmer, and Matthew Sundquist, Plotly Inc. has established itself as a key player in the data visualization space, with its origins in Montreal, Quebec.

    Plotly also empowers users to build data applications in Python, leveraging the Dash framework, also from Plotly Inc. Dash is designed for building machine learning and data science web applications with ease. The deployment process is streamlined, allowing users to deploy their apps with a simple button click, compatible with any cloud due to Dash's stateless architecture.

    Exporting Plotly Data to a CSV File

    Using the API Call

    The grid data from Plotly can be exported to a CSV file by making an API call. This functionality is available by default, and it exports only the raw values contained in the data grid, not the GUI representation. The exported CSV will contain the data as it is without formatting or visual representation.

    Right-Click Context Menu (Enterprise Only)

    For Enterprise users, Plotly offers the convenience of exporting grid data to CSV using the right-click context menu. This method simplifies the process by providing a direct way to initiate the export within the user interface.

    Disabling CSV Export

    If needed, the CSV export feature can be disabled. This is achieved by setting the suppressCsvExport property to True, which will prevent users from exporting the data to CSV format.

    Customizing CSV Export Options

    Plotly provides additional options for CSV exporting to cater to different user needs. These options include controlling which columns to export, whether to export only selected rows or all data, and the ability to add content before or after the exported data. Users can also choose to suppress quotes, skip headers, and manage other aspects of the CSV content.

    Sourcetable Integration

    Streamline Your Data Workflow with Sourcetable

    Experience the seamless integration of Plotly data into your spreadsheets without the hassle of exporting to CSV. Sourcetable provides a superior solution by syncing your live data directly from Plotly, eliminating the need for cumbersome export and import processes. This direct connection not only saves time but also ensures that your data remains current, giving you real-time insights for informed decision-making.

    With Sourcetable, you can easily aggregate data from various sources and manage it through a user-friendly spreadsheet interface. This powerful tool is designed for both automation and business intelligence, allowing you to streamline your workflows and focus on analysis rather than data management. Embrace the efficiency of Sourcetable and transform the way you handle your data.

    Common Use Cases

    • P
      Sourcetable Integration
      Sharing grid data with users who do not have access to the Plotly application
    • P
      Sourcetable Integration
      Including grid data in a formal documentation report
    • P
      Sourcetable Integration
      Utilizing the API call feature for automated data export processes
    • P
      Sourcetable Integration
      Disabling CSV export functionality for specific users or scenarios by setting gridOptions
    • P
      Sourcetable Integration
      Customizing the group name format in the exported CSV for enhanced clarity

    Frequently Asked Questions

    How can I export grid data to CSV in Plotly?

    You can export grid data to CSV using an API call or, if you have AG Grid Enterprise, by using the right-click context menu.

    What is included in the CSV export from Plotly?

    The CSV will include only the raw cell values. It does not include the cell renderer output, the GUI cell representation, or row group footers.

    How do I disable CSV export in Plotly?

    To disable CSV export, set the property 'suppressCsvExport = True' in your gridOptions.

    Can I format the group names when exporting to CSV in Plotly?

    Yes, if you are using AG Grid Enterprise, you can use 'processRowGroupCallback' to change the format of the group names in the CSV export.

    How can I provide a download link for users to export data to CSV?

    To let the user select where to download the file, simulate a download link in the browser by creating a Blob in Javascript. You can then use a callback to create a button within an html.A element, allowing users to 'download' the CSV.


    Our comprehensive guides provide all the necessary steps to seamlessly export grid data from Plotly to CSV, whether through API calls or the right-click context menu for Enterprise users. With the flexibility to enable or disable this feature and the ability to customize the export parameters, users have complete control over their data export experience. However, if you're seeking an even more integrated solution, consider Sourcetable, which allows you to import data directly into a spreadsheet, bypassing the need for manual exports. Sign up for Sourcetable today to streamline your workflow and get started.

    Start working with Live Data

    Analyze data, automate reports and create live dashboards
    for all your business applications, without code. Get unlimited access free for 14 days.