smozgur

Power Query vs. Google Translation API - Part 2

smozgur

BatCoder
Builders Club Member
Joined
Feb 28, 2002
Messages
2,571
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 can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
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,216,503
Messages
6,131,022
Members
449,616
Latest member
PsychoCube

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