Formula compatibility between GS-Calc and other spreadsheets |
If you come across compatibility/syntax differences between functions in formulas in GS-Calc and other spreadsheet programs, use the Tools > Convert Functions in Formulas command to modify your formulas accordingly when importing or exporting the data.
For example, in GS-Calc the Excel DATEDIF(date_number1, date_number2, format) function has a different form: DATEDIFF(date_time_string1, date_time_string2) which returns the standard date/time period string, e.g. =dateDiff(dateText(2005, 1, 1), dateText(2005, 12, 31)) returns "P364D".
To convert quickly the DATEDIF() functions in all formulas to DATEDIFF() functions (or vice versa), select the desirable cell range that may contain formulas with this function or the entire worksheet and in the Tools > Convert Functions 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 (if the number of years should be returned)
year(b)-year(a)
If there are multiple conversions required, you can define a permanent, multiple conversion rules using the Tools > Function Conversion Scripts command.