# 🚀 Excel to JSON – Operation Extension!

**URL:** https://community.directus.com/t/excel-to-json-operation-extension/402
**Category:** Showcase
**Created:** [May 24, 2025, 4:48pm UTC](https://community.directus.com/t/excel-to-json-operation-extension/402 "2025-05-24T16:48:31Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Abdallah](https://sea2.discourse-cdn.com/flex002/user_avatar/community.directus.com/abdallah/32/105_2.png) [@Abdallah](https://community.directus.com/u/Abdallah)
#### Post date: [May 24, 2025, 4:48pm UTC](https://community.directus.com/t/excel-to-json-operation-extension/402/1 "2025-05-24T16:48:31Z")

</div>

Hello everyone!  
I’m excited to share my very first Directus extension: **Excel to JSON**. This extension lets you easily convert Excel and spreadsheet files into clean JSON, right inside your Directus flows.

 ![excel-to-json-operation](https://us1.discourse-cdn.com/flex002/uploads/directus/original/1X/7346ed192ae8ddcc515842c75b2e9cfd610fa55d.png)

* * *

## What does it do?

- **Supports Excel, CSV, and TSV files**
- **Validates file types automatically**
- **Outputs structured JSON for your flows**

* * *

## How to use it (it’s super simple!):

1. **Add** the Excel to JSON operation to your flow.
2. **Pass** the file ID of your uploaded spreadsheet.
3. **Done!** Instantly get your data as JSON for further automation.

* * *

## Installation:

You can install it from the Directus Marketplace if `MARKETPLACE_TRUST=all` is set; otherwise, manual install is needed.  
_ **Note:** Currently, it supports only local storage files; cloud storage support is coming soon._

* * *

## Feedback & Collaboration

This is my first extension, so any help, advice, or feedback is very welcome!  
If you have suggestions, ideas, or want to contribute, please check out the repo or leave a comment.

**GitHub:** [directus-operation-excel-to-json](https://github.com/DatacenturiesDataC/directus-operation-excel-to-json)

---

<div class="post-metadata">

### Author: ![Beth](https://sea2.discourse-cdn.com/flex002/user_avatar/community.directus.com/beth/32/30_2.png) [@Beth](https://community.directus.com/u/Beth)
#### Post date: [May 27, 2025, 3:33pm UTC](https://community.directus.com/t/excel-to-json-operation-extension/402/2 "2025-05-27T15:33:13Z")

</div>

Thanks for sharing @Abdallah! This is great.

---

<div class="post-metadata">

### Author: ![JayShoe](https://sea2.discourse-cdn.com/flex002/user_avatar/community.directus.com/jayshoe/32/126_2.png) [@JayShoe](https://community.directus.com/u/JayShoe)
#### Post date: [June 20, 2025, 10:55am UTC](https://community.directus.com/t/excel-to-json-operation-extension/402/3 "2025-06-20T10:55:27Z")

</div>

Does this support batching? I have some files with 400,000+ lines and I’m trying to find a way to efficiently and reliably add or update based on the primary key. I understand your plugin will parse my excel document, and create Json. However, if would be nice if it generated batches of JSON in X count per batch so I don’t overload the system when doing so.

---

<div class="post-metadata">

### Author: ![Abdallah](https://sea2.discourse-cdn.com/flex002/user_avatar/community.directus.com/abdallah/32/105_2.png) [@Abdallah](https://community.directus.com/u/Abdallah)
#### Post date: [June 24, 2025, 1:55pm UTC](https://community.directus.com/t/excel-to-json-operation-extension/402/4 "2025-06-24T13:55:56Z")

</div>

I don’t think the extension currently support such a large number of rows, since in [line 29](https://github.com/DatacenturiesDataC/directus-operation-excel-to-json/blob/main/src/api.js#L29) we buffer the whole file at once. Also in [line 36](https://github.com/DatacenturiesDataC/directus-operation-excel-to-json/blob/main/src/api.js#L36) we extract the entire file result. So, that won’t work with big files.  
imho, I think you need to split the file into chunks using the current package (if SheetJS supports that) or using similar package to split or stream it.

> I’m trying to find a way to efficiently and reliably add or update based on the primary key

What’s also good about Directus is that in the for loops (using the trigger flow operation) you can select the iteration mode to handle the update process

 ![WhatsApp Image 2025-06-24 at 15.44.37_0197dbc7](https://us1.discourse-cdn.com/flex002/uploads/directus/original/1X/a1631127d4a53d1b0ac56501e917d058132e0d99.jpeg)
