We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug When using t.SetPageSize() method, the result page size and page number not right, and even show me some empty row data.
t.SetPageSize()
To Reproduce
Download Titanic data and convert to .xlsx, and saved to disk, then using Go Excelize lib to open and read some line, set paging.
.xlsx
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 } t := table.NewWriter() t.SetOutputMirror(os.Stdout) tableHeader := make(table.Row, 0) for _, cell := range rows[0] { tableHeader = append(tableHeader, cell) } t.AppendHeader(tableHeader) for _, row := range rows[1:7] { innerRow := make(table.Row, 0) for _, cell := range row { innerRow = append(innerRow, cell) } t.AppendRow(innerRow) t.AppendSeparator() } t.SetPageSize(2) t.Render() }
Screenshots
Software (please complete the following information):
The text was updated successfully, but these errors were encountered:
table: fix paging with separators; fixes #312
3819df4
d03b448
Hey @xjxl520303 thanks for identifying and reporting this bug in a easy-to-reproduce manner. Appreciate the details! 👍🏽
I've fixed this bug in https://github.com/jedib0t/go-pretty/releases/tag/v6.5.7 --- please try and let me know.
Just FYI, the issue was related to manually adding Separators with Paging.
Sorry, something went wrong.
@jedib0t tky fixed the bug, here is another bug I found #315
No branches or pull requests
Describe the bug
When using
t.SetPageSize()
method, the result page size and page number not right, and even show me some empty row data.To Reproduce
Download Titanic data and convert to
.xlsx
, and saved to disk, then using Go Excelize lib to open and read some line, set paging.Screenshots
Software (please complete the following information):
The text was updated successfully, but these errors were encountered: