From d08e90952e71eff80b8fd310ff94fb2b28657043 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s?= Date: Thu, 1 Jun 2023 19:10:49 -0300 Subject: work on issue 708 --- src/formats/xlsx.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/formats/xlsx.c b/src/formats/xlsx.c index 048633c..227489a 100644 --- a/src/formats/xlsx.c +++ b/src/formats/xlsx.c @@ -158,7 +158,10 @@ char * get_xlsx_number_format_by_id(xmlDocPtr doc_styles, int id) { // we go forward up to numFmts section xmlNode * cur_node = xmlDocGetRootElement(doc_styles)->xmlChildrenNode; - while (cur_node != NULL && !(cur_node->type == XML_ELEMENT_NODE && !strcmp((char *) cur_node->name, "numFmts"))) + //while (cur_node != NULL && !(cur_node->type == XML_ELEMENT_NODE && !strcmp((char *) cur_node->name, "numFmts"))) + while ((cur_node != NULL) && !(cur_node->type == XML_ELEMENT_NODE && + (!strcmp((char *) cur_node->name, "numFmts") || !strcmp((char *) cur_node->name, "cellStyleXfs") || + !strcmp((char *) cur_node->name, "cellXfs")))) cur_node = cur_node->next; cur_node = cur_node->xmlChildrenNode; -- cgit v1.2.3