+ Reply to Thread
Results 1 to 11 of 11

Running Excel calculation on a server remotely, as a calculation engine.

  1. #1
    Registered User
    Join Date
    07-20-2019
    Location
    England
    MS-Off Ver
    2011
    Posts
    4

    Running Excel calculation on a server remotely, as a calculation engine.

    I have inherited a huge spreadsheet with many thousands of intricate formulae which has been developed by multiple people over a period of some twenty years. The calculation engine that this spreadsheet provides is of critical utility. I need to be able to basically put this on the web. While I am able to do all the other parts of this programming exercise, I cannot work out how I can run the calculation through the Excel spreadsheet without running Excel itself. There are dire warnings all over the internet about using interop, or whatever the modern version is, as concurrent access, unexpected dialog boxes, and the like will surely scupper the attempt. So my question is: how can I use this byzantinely complex spreadsheet "from the outside" - provide it with a set of input data, allow it to calculate the results, and then read these out of specific cells in the sheet? I cannot find any reasonable software that will allow me to achieve this. Help greatly appreciated.

  2. #2
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: Running Excel calculation on a server remotely, as a calculation engine.

    Hi, welcome to the forum.
    If it's a spreadsheet and you need the code in it, you will need to address it (in Excel) to use it.
    You speak of over a period of some twenty tears so may I assume that the Excel version it was created in is previous to Excel 2007?
    That would mean that the Excel file has the extension xlsx?
    I would suggest you first open it and save it as a new version macro embedded file (extension is xlsm)
    You can use other file's code if you open it in the background, and if you just need it to read data you can open it as read-only so that others can access it too, but with the minimal explanation you have given and no idea whatsoever the 'intricate' file looks like and what kind of calculations you want to carry out it's difficult to say.
    Another thing that would be good to know for us is what is your level of macro knowledge (VBA).
    It might also be a project which is a lot more that just help but design and rewrite.
    ---
    Hans
    "IT" Always crosses your path!
    May the (vba) code be with you... if it isn't; start debugging!
    If you like my answer, Click the * below to say thank-you

  3. #3
    Registered User
    Join Date
    07-20-2019
    Location
    England
    MS-Off Ver
    2011
    Posts
    4

    Re: Running Excel calculation on a server remotely, as a calculation engine.

    Quote Originally Posted by Keebellah View Post
    You speak of over a period of some twenty tears so may I assume that the Excel version it was created in is previous to Excel 2007?
    That would mean that the Excel file has the extension xlsx?
    It's been developed continuously over twenty years, so it has been re-saved with the .xls extension at some point. It currently has the .xls extension.

    Quote Originally Posted by Keebellah View Post
    You can use other file's code if you open it in the background, and if you just need it to read data you can open it as read-only so that others can access it too, but with the minimal explanation you have given and no idea whatsoever the 'intricate' file looks like and what kind of calculations you want to carry out it's difficult to say.
    I think that you misunderstand what I am trying to achieve here. A do literally want to "[Run the] Excel calculation on a server remotely, as a calculation engine". As the file is hugely complex it's not possible to re-implement in a reasonable period of time. It contains a lot of intricate engineering calculations. So rather than try to re-implement it in a programming language, I want to treat the whole excel sheet as a function; i.e. I take some input data from a user via a javascript application running in a webpage, send that to my code on the server, supply the input parameters to the spreadsheet (there are approximately 300), allow it to calculate the results (it calculates 14 separate model scenarios and each has a couple dozen output parameters), then read out all those output parameters and send them back to the application running in the webpage and display them.

    While I appreciate that "rewrite it in a programming language" is a potential default response here, I can assure you I've tried and the complexity of the task is simply too high.

    Quote Originally Posted by Keebellah View Post
    Another thing that would be good to know for us is what is your level of macro knowledge (VBA).
    I'm fully familiar with macros, but this is rather a red herring as I'm not trying to do anything within the sheet itself - I want to run the sheet externally via code that I write. FYI, I'm a software engineer.

    Quote Originally Posted by Keebellah View Post
    It might also be a project which is a lot more that just help but design and rewrite.
    It's definitely a massive project that I am in the middle of. But I only have a narrow question for you here: what are the options for taking an Excel spreadsheet and running it remotely as a calculation engine?
    Last edited by redfish29; 07-21-2019 at 03:52 AM. Reason: typo

  4. #4
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: Running Excel calculation on a server remotely, as a calculation engine.

    The thing is that if you want to use the Excel file as a 'calculator' it still has to be addressed and opened even if it's for a moment, and that will required a script (vbs) or Excel itsself.
    If it's still in as xlsx then let me tell you that the filesize will be twice that of an xlsm file saved in Excel 2007 or newer format, I'm not sure but is 2011 a MAC version?
    You should look at vbs scripting tools to access / read Excel files and perform calculations using the created functions or macros, the formulas is altogether an other option.
    If you want the Excel file to be loaded in memory then you should save it as an AddIn (xlam) file , but leave it on the server, NOT in the predefined Add-In folder.
    You then add code the the Excel files (macro embedded then) that will load the xlam file on Opening and close it when finished, that way ALL the code in that file is available so you can address it while calculating
    It may all sound like gibberish but its harder to explain the use.

  5. #5
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: Running Excel calculation on a server remotely, as a calculation engine.

    I'd like to take a shot at it, could you attach a sample file with a mock up of one of the calculations you have in this old excel file and also a sample of the data wihich you want to process and where the result must be sent to
    Verify, please, if it's a Windows or MAC.
    No promises, but maybe I can offer an idea which you as system engineer will probably be able to solve.
    I'm a retired system's engineer myself and many time resorted to external scripts to get data from various data sources, even MS Access was an option to store large amounts of data

  6. #6
    Registered User
    Join Date
    07-20-2019
    Location
    England
    MS-Off Ver
    2011
    Posts
    4

    Re: Running Excel calculation on a server remotely, as a calculation engine.

    I can't share the original file as it's proprietary information that I don't own. But you can imagine literally any calculation (in fact, it's probably best to use something very, very simple as a test) where a set of cells are denoted the "input", some intermediate calculation occurs, and some other set of cells are denoted the "output". Imagine three input cells: A1, A2, A3. Then B1, B2, B3 in turn add 10, 20, and 30 to their input value. Then C1, C2, C3 can be the output cells, which are read out. Now, this is obviously ridiculous, but the point is that if it can be made to work for this simple case then it can be made to work for any case, no matter how complex the calculations. I'm on a Mac but the server will be a linux server (Ubuntu).

  7. #7
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: Running Excel calculation on a server remotely, as a calculation engine.

    Just to be sure.
    You DO work with Excel and this file will serve as input to calculations made on this other 'old' file you mention?

  8. #8
    Registered User
    Join Date
    07-20-2019
    Location
    England
    MS-Off Ver
    2011
    Posts
    4

    Re: Running Excel calculation on a server remotely, as a calculation engine.

    Quote Originally Posted by Keebellah View Post
    Just to be sure.
    You DO work with Excel and this file will serve as input to calculations made on this other 'old' file you mention?
    I am suggesting working with a specific Excel spreadsheet, but not the program Excel itself, as that doesn't work in the scenario of providing a backend calculation service, as per Microsoft's docs.

    The idea is that rather than Excel, another program will evaluate the spreadsheet against a set of inputs, and from it extract a set of outputs. The input data is just data - some strings, integers, and floats. The output is similarly just some numerical data. But the key is finding that "other program". That's what I'm asking for. I'm looking for a program that can take a spreadsheet and a set of data as input and "evaluate" the entire sheet in order to render a set of output.

  9. #9
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: Running Excel calculation on a server remotely, as a calculation engine.

    You're in for a world of pain, I'd start by dumping any VBA code and trying Excel Services, if that doesn't do what you need have a look at spreadsheet gear.

    There are companies out there that claim to offer a service that does this, but I suspect you'd be looking in the tens of thousands per year - though that maybe something you'd go for if it's important enough and the cost of a re-write to something else would really be that high. Something like https://www.spreadsheetweb.com/pricing/ or https://easasoftware.com/excel/

    I can't speak for any of these services as I've never used them

  10. #10
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: Running Excel calculation on a server remotely, as a calculation engine.

    Having read your later comments, spreadsheet gear may do what you want. It's essentially a calculation engine for Excel workbooks, as an example https://www.spreadsheetgear.com/supp...e=amortization

    They have a free trial and the full licence is only 800 quid if it works
    Last edited by Kyle123; 07-22-2019 at 06:19 AM.

  11. #11
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: Running Excel calculation on a server remotely, as a calculation engine.

    Yeah, I agree with Kyle123, you're looking for something that uses the large file you have as a stored procedure to calculate parameters/values passed and the source can be anything.
    Hope you find it in the links Kyle123 posted, It's above my knowledge but I'll try and think of a way, maybe even passing all the data to ms access and use that, then you can address it easier with sql and the advantage of ms access is the the formatting is respected at all times contrary to Excel which 'interprets' the format based upon the data passed and sometimes messes it all up

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Predicting/Regression Calculation For Server Utilization Power/CPU/Mem
    By brafter70 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-20-2019, 04:14 PM
  2. Server Uptime/Downtime Calculation
    By rovert.natsud in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 08-13-2018, 12:28 PM
  3. Replies: 4
    Last Post: 07-23-2013, 07:51 AM
  4. Running calculation
    By Cha11 in forum Excel General
    Replies: 1
    Last Post: 11-25-2012, 07:26 AM
  5. Benefits of using SQL Server with Excel for advanced calculation
    By jimstrongy in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-21-2012, 04:52 PM
  6. [SOLVED] how can i make an excel calculation engine?
    By Monique in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-29-2005, 05:05 PM
  7. Porting of Excel data to SQL Server 2000 remotely
    By Luke in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-22-2005, 03:06 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1