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
Projects

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 :(

@xuri xuri added this to Features in v2.0.0 Mar 6, 2019
@xuri xuri moved this from Features to API changed in v2.0.0 Mar 6, 2019
@albenik albenik closed this as completed Mar 6, 2019
v2.0.0 automation moved this from API changed to Bug fixes Mar 6, 2019
@xuri xuri moved this from Bug fixes to API changed in v2.0.0 Mar 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
v2.0.0
  
API changed
Development

No branches or pull requests

1 participant