vendredi 27 mars 2015

Run javascript function on cells of CSV / excel file

I have a javascript function here (view page source) that converts all the simple-text content of a text box into Unicode Devnagri script, following a character substitution algorithm, and outputs to another text box. I want to take this to Excel / CSV file, where for the chosen cells or cell range, the content of each cell should be processed by this function.


Is there a way to import a javascript function to excel and run it there? Like a macro or something : If I have to convert this to VBA code then how to do so? Or is there a way to import the CSV file to javascript, run the function on each cell and produce output CSV?


Additional info: the use-case is for converting documents that use legacy Hindi fonts (where the font-face of an ASCII character was a hindi character.. if you don't have the font installed then you see gibberish) into Unicode that can be seen without needing the special font files. The character substitution is made a little complicated owing to special character-joins, and vowels (maatras) of the Devnagri script that can prefix or suffix the consonant, and so needs the Javascript function. Simple find-replace action doesn't work.


Aucun commentaire:

Enregistrer un commentaire