smozgur

Power Query vs. Google Translation API - Part 2

smozgur

BatCoder
Joined
Feb 28, 2002
Messages
2,538
smozgur submitted a new Excel article:

Power Query vs. Google Translation API - Part 2 - How to make more effective basic API calls in Power Query

In the first article of this series, Using Power Query in Excel to Translate Data Using the Google Translation API, we discussed retrieving data from a web server by using a simple API call. In the article, we used the Google Translation API endpoint.

Although it seems like a good idea to translate text in each row separately, there are some...

Read more about this Excel article...
 
Last edited:

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
Very impressive !
I tried using to translate about 60 lines from English to Chinese.
It works, but stopped about 1/3 in the list ( I don't think that I hit the API limit

this is what it returns :

An error occurred in the ‘Translator’ query. Expression.Error: There weren't enough elements in the enumeration to complete the operation.
Details:
List
 
Any error is mostly because of the API limit in this code. It might be passing all text at once, so it is only one web call, however, content length is still a reason for Google to reject translation. I didn't have any problem with less than 5000 characters including spaces, but it surely has a limit.

Perhaps you have much more than this?
 
is it that difficult to adapt the query to the non anonymous version of the API ?
Or to switch it to Azure. (they seem to have a similar service that offers 2M character free /month)

 
Hello! This seems really useful! Is there a way to do this when the original data source is from the web? I am using get data--> web to connect to an excel file download hosted on a website. It looks like this "source = Excel.Workbook(Web.Contents("https://www.XXXXX.org/XXXXXX"). Please let me know! Also is there a way to add the translated column and the original column, but then maintain the other columns in the original query?
 

Forum statistics

Threads
1,214,659
Messages
6,120,783
Members
448,992
Latest member
prabhuk279

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top