unidoc / unioffice

Pure go library for creating and processing Office Word (.docx), Excel (.xlsx) and Powerpoint (.pptx) documents

Home Page:https://unidoc.io/unioffice/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RangeReference.ParseRangeReference bug

m13934221960 opened this issue · comments

Description

when sheetname include char '!'(excel allowed),the following code will not work!

        sheetName := ""
	sp0 := strings.Split(s, "!")
	if len(sp0) == 2 {
		sheetName = sp0[0]
		s = sp0[1]
	}

Expected Behavior

pos := strings.LastIndex(s, "!")
if pos < 0{
return CellReference{}, CellReference{}, errors.New("invalid range format")
}
sheetName := s[0:pos]
s = s[pos+1:]

Actual Behavior

Please include a reproducible code snippet or document attachment that
demonstrates the issue.

Welcome! Thanks for posting your first issue. The way things work here is that while customer issues are prioritized,
other issues go into our backlog where they are assessed and fitted into the roadmap when suitable.
If you need to get this done, consider buying a license which also enables you to use it in your commercial products.
More information can be found on https://unidoc.io/