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

Why xlsx.RemoveRow("Sheet1", 2) removes 3rd row not second? #349

Closed
albenik opened this issue Mar 6, 2019 · 1 comment
Closed

Why xlsx.RemoveRow("Sheet1", 2) removes 3rd row not second? #349

albenik opened this issue Mar 6, 2019 · 1 comment

Comments

@albenik
Copy link
Contributor

albenik commented Mar 6, 2019

As described in https://github.com/360EntSecGroup-Skylar/excelize/blob/master/rows.go#L341

// RemoveRow provides a function to remove single row by given worksheet name
// and row index. For example, remove row 3 in Sheet1:
//
// xlsx.RemoveRow("Sheet1", 2)

@albenik
Copy link
Contributor Author

albenik commented Mar 6, 2019

Ok, answer myself.
Because row argument probably is not Excel row number, but zero-based slice row number.

Counter-intuitive as for me :(

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

1 participant