title: Run javascript function on cells of CSV / excel file
body: <p>I have <a href="http://nikhilsheth.techydudes.net/files/PuneBudget_to_Unicode_Converter.html" rel="nofollow noreferrer">a javascript function here</a> (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.</p>
  
  <p>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?</p>
  
  <p>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.</p>
  
  <p>EDIT: Upon trying out a proposed solution, I hit <a href="https://stackoverflow.com/questions/9725882/getting-scriptcontrol-to-work-with-excel-2010-x64">this roadblock</a> with my 64-bit Office2010 installation : "scriptcontrol is a 32bit component only and will not run inside a 64bit process".</p>
  
  <p>Can you show how to do this in OpenOffice? Or Google Docs/Spreadsheets? Or can this be done by importing and processing the CSV/XLS in a webpage?</p>