• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 691
  • Last Modified:

How do I calculate excel formula without opening excel?

Question: How do I calculate excel formula without opening excel (or Excel Process)?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Dear Experts,

I have an excel formula... [=(C38+C36+C43+Sheet1!D13+Sheet2!C8)/1000]. This was inserted into Excel without using Excel application (it was done using a special .NET library) Unfortunately the .NET library does not support Macro... which means... these so-called 'formulas' are really inserted as texts & values, and without really opening this file in Excel it won't get re-calculated and saved, and so I am unable to read it's true result value.

Do I have to program an Engine that does exactly what Excel do? Or is there some other ways around it? Also, is there ways to read VBA macro without opening Excel?

PS: I cannot do the easiest... I cannot open Excel... this is because it's a web application, it will be ran on the server, used by multiple users at the same time...
0
scy501642229
Asked:
scy501642229
  • 3
  • 2
1 Solution
 
NorieCommented:
How exactly was this inserted?

Is some sort of automation of Excel being used?
0
 
hehdaddyCommented:
Hi there,

What version of Excel are you manipulating and what third-party Excel component are you using?
0
 
scy501642229Author Commented:
I am using Winnovative's Excel Library for .NET (http://www.winnovative-software.com/excel-library.aspx). It works with all Excel version (97-2003, 2007). The way it was inserted was by first extracting the data from Excel to a database, then after running stored procedures through SQL Server Management Studio, I throw the table from database onto a DataTable. I then loop the datatable and insert them onto the Excel sheet.

There is no automation involving any component of Excel / Microsoft Office / ADO.NET / InterOp / VBA. All of them are done using C#.

The version I'm current on is 97-2003 (.xls), but this program is intended to run both .xls and .xlsx (97-2003, 2007).
0
Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

 
scy501642229Author Commented:
The thing I'm really thinking for is Excel formula calculator

I've already done all the coding that it will extract Excel Spread sheet, execute stored procedure and download it (select by user). However, in order to have all the formula calculated, I need to download and save it, then open it using Excel (because it re-calculates all formula when it starts by default), then save the "re-calculated" version even though I didn't do a thing.

What I'm looking for is either some hints & direction as to where to find this Excel formula calculator.
0
 
hehdaddyCommented:
I did a lot of searching, but I couldn't find a solution for you. There are other Excel libraries that will do recalculations, but obviously you can't change course now.

I'm sorry I couldn't help.
0
 
scy501642229Author Commented:
Its ok, I also founded other Excel library that does formula calculations... the problem is that the cost is too high... which means I might just have to write the calculator myself... thanks though.
0

Featured Post

NEW Veeam Backup for Microsoft Office 365 1.5

With Office 365, it’s your data and your responsibility to protect it. NEW Veeam Backup for Microsoft Office 365 eliminates the risk of losing access to your Office 365 data.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now