Dokaz API › Blog

Share app data easily with a spreadsheet

· data, spreadsheet, json, csv, api

Getting data out of your app

Most applications store data in a structured format, often JSON. This format is great for applications because it's efficient and easy to work with programmatically. However, it's not always the most accessible format for everyone in your office. Your sales team, your finance department, or even your manager might need to see this data, but they might not be comfortable opening a JSON file and trying to decipher it.

Think about a scenario: your app tracks customer orders. The data is stored as a JSON list of records, each containing details like the customer's name, order date, items purchased, and total amount. To share this with the finance team for reconciliation, you need to get that data into a spreadsheet format like Excel or CSV.

The challenge of manual exports

Manually exporting data from your application and converting it to a spreadsheet can be a tedious and error-prone process. You might be tempted to copy and paste data into a spreadsheet, but this is time-consuming and increases the risk of errors. Furthermore, if the data changes frequently, you'll need to repeat this process every time, creating a bottleneck and potentially leading to inconsistencies.

Other approaches might involve writing custom scripts or using complex data manipulation tools. While these solutions can work, they often require specialized technical skills and can be difficult to maintain. What if there was a simpler way to transform your JSON data into a spreadsheet format without needing to be a coding expert?

Introducing the convert API

That's where the convert API comes in. It's a straightforward solution for converting JSON data into CSV format, which can then be easily opened in spreadsheet applications like Excel or Google sheets. The process is simple: you send a JSON list of records to the API, and it returns the equivalent data in CSV format.

How it works

  1. Prepare your JSON data: ensure your data is in a valid JSON list format. Each element in the list represents a record. For example:

```json [ {"customer-name": "{customer-name-1}", "order-date": "{order-date-1}", "items": "{items-1}", "total-amount": {total-amount-1}}, {"customer-name": "{customer-name-2}", "order-date": "{order-date-2}", "items": "{items-2}", "total-amount": {total-amount-2}} ] ```

  1. Send the request: send a post request to the convert API with the JSON data in the request body.

```json [ {"customer-name": "{customer-name-1}", "order-date": "{order-date-1}", "items": "{items-1}", "total-amount": {total-amount-1}}, {"customer-name": "{customer-name-2}", "order-date": "{order-date-2}", "items": "{items-2}", "total-amount": {total-amount-2}} ] ```

  1. Receive the CSV data: the API will respond with the equivalent data in CSV format. You can then save this data to a file and open it in your spreadsheet application.

Benefits of using the convert API

Sharing data across departments

By using the convert API, you can empower your colleagues to access and analyze data without needing to rely on technical experts. This fosters collaboration and improves decision-making across departments. Imagine your marketing team wanting to analyze customer order data to identify trends and optimize campaigns. With the convert API, they can easily obtain the data in a spreadsheet format and perform their analysis without any technical hurdles.

Beyond basic spreadsheets

While CSV is a widely compatible format, the convert API can be a stepping stone to more advanced data analysis. Once your data is in a spreadsheet, you can use it for various purposes, such as:

Try it

More

Get the weekly email

New posts, new tools and what we are building, once a week. One click to leave.

We send a confirmation link first; nothing arrives unless you click it.