This project has moved and is read-only. For the latest updates, please go here.

Autorefresh of formulabased content

Jun 4, 2010 at 9:33 AM


Im having trouble with "refreshing" the content in formulabased cells.

The program flow is as following:

1 - import csv to Datatable

2 - Update content and set formulaes > save to excel with Epplus

3 - Import Excel file to datatable

My flow may seem inlogical, but before importing the excel again to my application I usally have split the excelfiles manually an done som QA, sorting etc :)

In other words I usually - Save the excel file IN MS-EXCEL - before importing it again. The formula values is then correctly updated.

But: in some cases I have to import the ORIGNAL xlsx file, generated with Epplus, without opening it manually and re-saving it with MS-Excel.  The problem occures in theese instances. When imorting, none of the formulas show the correct values.

Any suggestions?

Jun 4, 2010 at 2:10 PM

Hi again.

The component has no calculation engine, so all formulas are calculated in Excel.


Jun 4, 2010 at 4:02 PM

Ok - have to use a com interface to open and resave the xlsx file silently, right after generating it then.

Thought it was possible to assign a "refresh formula on opening" option to formulaes. Ive seen it 'somwhere' in docs from one of the several packages ive been testing lately. But havent the slightest clue from where.....  :) 

Regards :)


Jun 6, 2010 at 1:40 PM

I dont know if you mean the CalcMode property in the workbook class, but you still need to open it in Excel to have the formulas calculated