From aa6a8454760fa0030035885d5cd047e97cf88711 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s?= Date: Mon, 21 Jun 2021 10:18:21 -0300 Subject: xlsx.c: convert to uppercase before replacing functions --- src/formats/xlsx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/formats/xlsx.c b/src/formats/xlsx.c index 3918b1a..48e22f6 100644 --- a/src/formats/xlsx.c +++ b/src/formats/xlsx.c @@ -312,9 +312,10 @@ void get_sheet_data(xmlDocPtr doc, xmlDocPtr doc_strings, xmlDocPtr doc_styles) ) { char * formula = (char *) child_node->xmlChildrenNode->xmlChildrenNode->content; char * strf; + uppercase(formula); // we take some excel common function and adds a @ to them - // we replace count sum avg with @count, @sum, @prod, @avg, @min, @max + // we replace count sum avg with @count, @sum, @prod, @avg, @min, @max strf = str_replace (formula, "COUNT","@COUNT"); strcpy(formula, strf); free(strf); -- cgit v1.2.3