fix: infinite loop due to hidden row in XLSX.stream.to_json #3178
No reviewers
Labels
No Label
DBF
Dates
Defined Names
Features
Formula
HTML
Images
Infrastructure
Integration
International
ODS
Operations
Performance
PivotTables
Pro
Protection
Read Bug
SSF
SYLK
Style
Write Bug
good first issue
No Milestone
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: sheetjs/sheetjs#3178
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "deepak-negi-web/sheetjs:patch-1"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Title:
Fix for Incorrect Row Indexing and Infinite Loop in stream.to_json Function
Description:
This pull request addresses two key issues in the
stream.to_json
function of the SheetJS library:Infinite Loop: Previously, when a row was hidden, the function skipped processing the current row without incrementing the row counter
R
, resulting in an infinite loop during execution.Incorrect Row Indexing: The row index was incorrectly accessed using a one-based index, whereas the actual row index was zero-based. This led to unintended hidden rows being included in the stream and skipping of subsequent non-hidden rows.
Changes:
R
after identifying a hidden row to ensure the loop progresses to the next row.Testing:
stream.to_json
function no longer enters an infinite loop when encountering hidden rows.Impact:
This fix enhances the reliability of the SheetJS library, ensuring accurate data streaming from spreadsheets without infinite loops or incorrect row handling.
Checklist:
Additional Information:
These changes are crucial for maintaining the library's functionality in production environments, where precise data handling is essential.
References:
Closes #3176.