1. Overview
If you encounter compatibility or syntax differences between functions used in formulas in GS-Calc and other spreadsheet applications, you can adjust your formulas automatically using:
Tools → Convert Functions in Formulas
This command allows you to modify formulas during import or export so they match the syntax expected by the target spreadsheet program.
2. Example: Converting DATEDIF / DATEDIFF
In Excel, the function:
DATEDIF(date_number1, date_number2, format)
has a different form in GS-Calc:
DATEDIFF(date_time_string1, date_time_string2)
which returns a standard date/time period string. For example:
=dateDiff(dateText(2005, 1, 1), dateText(2005, 12, 31)) returns "P364D".
2.1 Converting DATEDIF → DATEDIFF
To convert all DATEDIF() functions in formulas to DATEDIFF() (or vice versa), select the desired cell range or the entire worksheet, then open:
Tools → Convert Functions
In the dialog box, enter:
Original function:
datedif(a,b,c)
Replacement:
datediff(dateText(year(a), month(a), day(a)), dateText(year(b), month(b), day(b)))
or
datediff(dateText(year(a), month(a), day(a)), todayText())
or (to return the number of years)
year(b) - year(a)
3. Multiple Conversion Rules
If multiple conversions are required, you can define permanent multi‑rule conversion scripts using:
Tools → Function Conversion Scripts