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

RawCellValue doesn't work when passed in OpenReader function #1815

Closed
vivekkairi opened this issue Feb 14, 2024 · 2 comments
Closed

RawCellValue doesn't work when passed in OpenReader function #1815

vivekkairi opened this issue Feb 14, 2024 · 2 comments

Comments

@vivekkairi
Copy link
Contributor

Description
Passing RawCellValue: true in excelize.OpenReader doesn't get the raw values because the GetRows function accepts a separate Options object which doesn't take in consideration the Options passed in OpenReader

Steps to reproduce the issue:

  1. Create a excel with numeric data and prepend the data with 0 values
f, openErr := excelize.OpenReader(reader, excelize.Options{
    RawCellValue: true,
})
rows, err := f.GetRows(sheetName)

Describe the results you received:
The rows will have columns with the 0 prefix removed

Describe the results you expected:
The 0 prefix should be there as RawCellValue was passed as true

Output of go version:

go version go1.21.6 darwin/arm64

Excelize version or commit ID:

v2.8.0

@xuri
Copy link
Member

xuri commented Feb 15, 2024

Thanks for your issue and pull request. I've left some comments in the pull request.

@xuri xuri closed this as completed in ee2ef15 Feb 15, 2024
@xuri
Copy link
Member

xuri commented Feb 15, 2024

Thanks for the contribution. This patch will be released in the next version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants