title: Using Excel spreadsheets with macros in backend of web application
body: <p>I have an architectural nightmare lying before me and want to clear some details.</p>
  
  <p>So, the question is as follows:</p>
  
  <p><em>How can someone build a web application which uses some macros buried deep in the Excel spreadsheet as a back-end for computations?</em></p>
  
  <p>The background:
  My client has an Excel spreadsheet doing some calculation for him (so it's in some ways an Excel application). Now he is willing to have a WEB app using the same Excel spreadsheet as a back-end. Yep, it's as said: to have a web front-end doing queries to the macros in this Excel spreadsheet and getting calculated data back. No, I cannot look at the macros source and translate it to my target language, because the spreadsheet is password-protected from editing.</p>
  
  <p>The main web server which better be left untouched is Apache. The target development language I most proficient with is PHP.</p>
  
  <p>I have read the <a href="http://support.microsoft.com/kb/194611/en-us" rel="nofollow noreferrer">Microsoft Support article about Excel&lt;->VB interoperability</a> and <a href="https://stackoverflow.com/questions/6103193/how-to-integrate-application-with-excel-macros">question here about the Excel&lt;->C# interoperability</a> and concluded that the task is possible with the next dataflow:</p>
  
  <p>Apache -> Some C#.NET / VB.NET app in backend as a relay -> my Excel spreadsheet -> back to relay -> Apache</p>
  
  <p>but of course I think it's just horrible and I want some more sensible solution.</p>