Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get empty string when the value is INF of field #1287

Closed
LooJee opened this issue Jul 26, 2022 · 4 comments
Closed

get empty string when the value is INF of field #1287

LooJee opened this issue Jul 26, 2022 · 4 comments
Labels
duplicate This issue or pull request already exists

Comments

@LooJee
Copy link

LooJee commented Jul 26, 2022

Description
If the value of the field is "INF", the program returns "" both when GetCellValue and GetRows.

debug info :
image

value in excel :
image

Describe the results you received:
empty string ""
Describe the results you expected:
as string : INF
Output of go version:

go version go1.18.4 darwin/arm64

Excelize version or commit ID:

github.com/xuri/excelize/v2 v2.6.0
@LooJee
Copy link
Author

LooJee commented Jul 26, 2022

it's ok when i use github.com/xuri/excelize/v2 v2.5.0

@xuri
Copy link
Member

xuri commented Jul 26, 2022

Thanks for your issue. Could you provide your input file attachment without confidential info?

@xuri xuri added the needs more info This issue can't reproduce, need more info label Jul 26, 2022
@LooJee
Copy link
Author

LooJee commented Jul 26, 2022

INF_example.xlsx

here is an example

func ParseQuestions(data string)  error {
	xlsx, err := excelize.OpenReader(strings.NewReader(data))
	if err != nil {
		return errors.Wrap(err, "open xlsx failed")
	}

	rows, err := xlsx.GetRows(streamWriterName)
	if err != nil {
		return  errors.Wrap(err, "get xlsx rows failed")
	}

	fmt.Println(rows)

	return  nil
}

@xuri
Copy link
Member

xuri commented Jul 26, 2022

Thanks for your feedback, this issue was duplicate with #1275 and #1219, I have fixed it, please upgrade to the master branch code, and this patch will be released in the next version.

@xuri xuri added duplicate This issue or pull request already exists and removed needs more info This issue can't reproduce, need more info labels Jul 26, 2022
@xuri xuri closed this as completed Jul 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants