0

My server needs to load many Excel Workbooks in memory at the same time. The server then receives requests specifying the workbook and other parameters. The server finds a specific page in the specified workbook and sets various cell values to the specified parameters. It then reads other computed cell values and returns these results as the request response.

Is there a way to do this with Excel, with one of its libraries or a third-party product?

I have been using Apache POI for a few years for these Excel based spreadsheets calculations. The problem is that I too often end up having to complete the library because of missing or buggy features. I am at the point where I am seriously considering using Excel to do my work.

  • 1
    You would have to actually install Excel on your server and write a wrapper to it for the automation. Have you actually considered the load running multiple instances of Excel on your machine to support all the connections that would be made to the server (memory overhead alone would be intense). As far as *a third party product*, the [help/on-topic] guidelines say you can't ask for recommendations for off-site resources here. – Ken White Mar 12 '20 at 00:23
  • I have already compared Apache POI and Excel (stand alone process) in terms of memory footprint and POI takes up about twice as much. I'm not sure how it would be if I loaded 200 Workbooks. – Charles Quinlan Mar 12 '20 at 00:56
  • Run 100 instances of Excel (for automation with 100 clients attached to your server) each with *those many spreadsheets* opened in it. What about then? – Ken White Mar 12 '20 at 00:58
  • I'm not too familiar with recent automation (did COM when younger). Does the number of clients have to match the number of spreadsheets? Is there a licencing issue here? – Charles Quinlan Mar 12 '20 at 01:04
  • 1
    seems it can't be done: https://support.microsoft.com/en-gb/help/257757/considerations-for-server-side-automation-of-office – Charles Quinlan Mar 12 '20 at 01:12
  • This question seems to imply that it can be done: https://stackoverflow.com/questions/9493106/editing-an-excel-document-with-macros-in-asp-net/9493163 – Charles Quinlan Mar 12 '20 at 01:31
  • The question in your last link was written 8 years ago, in 2012. It's also about ASP.Net. Hmm... a link from MS documentation, or a nearly decade-old SO question that doesn't really apply here... Wonder which one is more accurate today? Oh, wait - that MS link says it's relevant for Excel **2010**. – Ken White Mar 12 '20 at 01:37

0 Answers0