Use GPT API as a translator for Excel

I’m in the process of developing a software solution to translate Excel files into different languages. My initial approach involves converting an entire Excel sheet into CSV format and then using an API to translate the whole sheet in a single request. While this method is functional, it fails to preserve the nuanced structure of the original Excel sheets.

I’m contemplating using GPT to perform translations on a cell-by-cell basis, but I’m concerned about the overhead this might create. Specifically, I would need to send an API request for each individual cell, each with the format: “Please translate Text (from a cell) from Language 1 to Language 2.”

Does anyone have suggestions on how to best balance efficiency and structural integrity in this context?

Welcome to the developer forum!

You could batch the process up into blocks of text to be translated with some form of delimiter ({{{text}}} maybe?) to keep them separate and then use traditional software to make the string exchange

Yes, I can basically turn the cells into a JSON list format and do the translation in batch! That’s a good idea!