Prompt-based JSON to .xlsx Conversion: Turning Interview Metadata into a Structured Excel File

Prompt-based JSON to .xlsx Conversion: Turning Interview Metadata into a Structured Excel File
Source: Freepik via freepik licence

Interview metadata often arrives in semi-structured formats, making it difficult to analyse or integrate into standard research workflows. This short prompt-based approach shows how GenAI can transform a JSON file containing interview-related metadata into a clean, structured Excel (.xlsx) file—in seconds, without requiring any programming knowledge. The method enables researchers to quickly prepare their data for further analysis or archiving, using only natural language.

Input file

The input was a synthetic JSON file containing metadata on 200 fictional interviews. Each record included the following variables: a unique id, the name and email address of the interviewee, their city and country, the interview_date, and the interview_duration_minutes. The dataset was generated to mimic real-world research metadata while ensuring full privacy and consistency in structure.

Prompt

Please convert the following JSON data into a table and return it as an .xlsx file.

Each object in the JSON should become a separate row, and the following fields should be used as column headers:

  • id
  • name
  • email
  • city
  • country
  • interview_date
  • interview_duration_minutes

Please ensure the output is provided in a valid .xlsx format, suitable for opening in Microsoft Excel without any conversion or formatting issues.

First rows of the input file

Output

Using the prompt, Mistral generated the requested .xlsx file in just 1–2 seconds. The resulting spreadsheet was cleanly structured, with all column headers correctly applied and each interview record placed in its own row. The file was immediately downloadable and ready for use in Excel — no further formatting or conversion was required.

GPT-4o's performance (accessed on 6 April 2025)
First rows of the output file

Recommendations

While this task was successfully completed using Mistral Le Chat, other GenAI models are also capable of handling similar data transformation tasks—provided they support the desired output format. For instance, many large language models (LLMs) can interpret structured JSON data and generate tabular outputs. However, not all models currently support direct .xlsx file generation. Tools such as Gemini, for example, may correctly process the JSON input but cannot produce downloadable Excel files as output. When selecting a GenAI solution for this task, it is essential to ensure compatibility with both input and output formats.

The authors used Mistral Le Chat [Mistral AI (2025), Le Chat (accessed on 6 April 2025), Large Language Model (LLM), available at: https://chat.mistral.ai/] to generate the output.