summaryrefslogtreecommitdiffstats
path: root/src/xlsx.c
diff options
context:
space:
mode:
authordave <ydrah32@gmail.com>2019-01-14 16:05:54 +0000
committerdave <ydrah32@gmail.com>2019-01-14 16:05:54 +0000
commit43d5fc7145244a306215c7b227fa715ff59cad2a (patch)
treeae15a4eec1b4a26b55b4218885b18ecd56b669bb /src/xlsx.c
parent820079e4977f02dfd20cb25f38e412da2ff874bb (diff)
added --sheet to doc, fixed minor bug
Diffstat (limited to 'src/xlsx.c')
-rw-r--r--src/xlsx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/xlsx.c b/src/xlsx.c
index 26d53e6..a8d7d18 100644
--- a/src/xlsx.c
+++ b/src/xlsx.c
@@ -453,7 +453,7 @@ int open_xlsx(char * fname, char * encoding) {
if ( ! found ){
// use sheet number if sheet name does not match
name = get_conf_value("sheet");
- int i = strlen(name)-1;
+ int i = strlen(name);
while( --i >= 0 && isdigit(name[i]) > 0 );
name = i < 0 ? "sheet":"";
snprintf(namebuf,30,"xl/worksheets/%s%s.xml",name,get_conf_value("sheet"));