Skip to content

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

@albenik

Description

@albenik
Contributor

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)

Activity

albenik

albenik commented on Mar 6, 2019

@albenik
ContributorAuthor

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @albenik

        Issue actions

          Why xlsx.RemoveRow("Sheet1", 2) removes 3rd row not second? · Issue #349 · qax-os/excelize