Closed xjxl520303 closed 7 months ago
Describe the bug
When I set row auto merge and the column 2 auto merge, then set pagination, I found some separated page item missing the data same as last page's last row or column or multiple r/c.
To Reproduce
here is the code
package main import ( "fmt" "os" "github.com/jedib0t/go-pretty/v6/table" "github.com/xuri/excelize/v2" ) func main() { f, err := excelize.OpenFile("E:\\ExcelDemo\\titanic.xlsx") if err != nil { fmt.Println(err) return } defer func() { if err := f.Close(); err != nil { fmt.Println(err) } }() rows, err := f.GetRows("titanic") if err != nil { fmt.Println(err) return } rowConfigAutoMerge := table.RowConfig{AutoMerge: true} t := table.NewWriter() t.SetOutputMirror(os.Stdout) tableHeader := make(table.Row, 0) for _, cell := range rows[0] { tableHeader = append(tableHeader, cell) } t.AppendHeader(tableHeader, rowConfigAutoMerge) for _, row := range rows[1:10] { innerRow := make(table.Row, 0) for _, cell := range row { innerRow = append(innerRow, cell) } t.AppendRow(innerRow, rowConfigAutoMerge) t.AppendSeparator() } t.SetColumnConfigs([]table.ColumnConfig{ {Number: 2, AutoMerge: true}, }) t.SetPageSize(3) t.Render() }
Screenshots
Software (please complete the following information):
Paging and auto-merge has never been tested. 😭
I'll take a look at this as soon as I can.
@xjxl520303 check https://github.com/jedib0t/go-pretty/releases/tag/v6.5.8 --- this should fix it.
Describe the bug
When I set row auto merge and the column 2 auto merge, then set pagination, I found some separated page item missing the data same as last page's last row or column or multiple r/c.
To Reproduce
here is the code
Screenshots
Software (please complete the following information):