ExcelFile.ConvertFormulasToValues Method
Overloads
ExcelFile.ConvertFormulasToValues(Boolean)
Use it to convert formulas to their values. It can be useful if for example you are copying the sheet to another workbook, and you don't want any references to it. NOTE: You will probably want to use ConvertExternalNamesToRefErrors(Boolean) too, to convert named ranges besides the formulas.
Also note that if you want to convert a whole file, you need to call ConvertFormulasToValues in every sheet.
Syntax
Namespace: FlexCel.Core
public void ConvertFormulasToValues(Boolean onlyExternal)
Parameters
<-> | Parameter | Type | Description |
---|---|---|---|
onlyExternal | Boolean | When true, it will only convert the formulas that do not refer to the same sheet. For example "=A1+Sheet2!A1" will be converted, but "=A2+A3" will not. |
See also
ExcelFile.ConvertFormulasToValues(Boolean, Boolean)
Use it to convert formulas to their values. It can be useful if for example you are copying the sheet to another workbook, and you don't want any references to it. NOTE: You will probably want to use ConvertExternalNamesToRefErrors(Boolean) too, to convert named ranges besides the formulas.
Also note that if you want to convert a whole file, you need to call ConvertFormulasToValues in every sheet.
Syntax
Namespace: FlexCel.Core
public abstract void ConvertFormulasToValues(Boolean onlyExternal, Boolean recalcBeforeConverting)
Parameters
<-> | Parameter | Type | Description |
---|---|---|---|
onlyExternal | Boolean | When true, it will only convert the formulas that do not refer to the same sheet. For example "=A1+Sheet2!A1" will be converted, but "=A2+A3" will not. |
|
recalcBeforeConverting | Boolean | If true (the default), FlexCel will try to recalculate the file before converting the formulas. Use false when for any reason FlexCel can't recalculate the values (for example if you have links to other files that don't exist anymore) |