Google Apps Script Function Library for English & Dhivehi
This library allows you to convert Maldivian Rufiyaa (MVR) amounts into written words in both English and Dhivehi, so you can use them directly in Google Sheets for invoices, vouchers, cheques, and other official documents.
As office tasks become more automated, tools like Google Apps Script and Google Sheets make it easy to standardize and improve day-to-day work. Even without deep knowledge of artificial intelligence, we can still use these platforms to structure information, perform accurate calculations, and reduce manual effort.
Because the Maldivian Rufiyaa is used only in the Maldives, support for it is limited in generic tools. I studied the way currency values are written in Dhivehi and English and identified a consistent logical structure. Based on that, I created this Apps Script library to automatically convert MVR values into written text.
I warmly welcome feedback, suggestions, and ideas to further improve this library.
How to Add the Library in Google Apps Script
Open your Google Apps Script project
-
In Google Sheets: Extensions → Apps Script
-
-
In the left sidebar, find “Libraries”.
-
Next to “Libraries”, click “Add a library”.
-
In the “Script ID” field, paste the following:
-
Click Lookup.
-
Select the latest version (or the version you prefer).
-
Click Add.
-
Optionally, set a short identifier name for the library.
For Example:
If the library has given the name SP, You can write the same below to create a custom function.function spellnumber(number){return SP.DhivehiSpellNumberMVR(number);}In a google sheet, write the formula that you have created in any cells that you need to get the output and the parameter (number) in the cell that the currency value."=spellnumber(number)"Eg: number = "12.13"
No comments:
Post a Comment