forked from sheetjs/sheetjs
deepak-negi-web
5550b90704
**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: 1. **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. 2. **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:** - Modified the hidden row check to use the correct zero-based indexing - Incremented `R` after identifying a hidden row to ensure the loop progresses to the next row. - Ensured that the stream correctly processes all rows, skipping hidden rows without affecting subsequent rows. **Testing:** - Validated that the `stream.to_json` function no longer enters an infinite loop when encountering hidden rows. - Confirmed that the correct rows are processed and pushed to the stream, with hidden rows being appropriately skipped. **Impact:** This fix enhances the reliability of the SheetJS library, ensuring accurate data streaming from spreadsheets without infinite loops or incorrect row handling. **Checklist:** - [x] Code changes have been tested locally. - [x] The changes adhere to the project's coding standards and guidelines. **Additional Information:** These changes are crucial for maintaining the library's functionality in production environments, where precise data handling is essential. **References:** Closes #3176. --- Reviewed-on: sheetjs/sheetjs#3178 Co-authored-by: deepak-negi-web <deepak-negi-web@noreply.git.sheetjs.com> Co-committed-by: deepak-negi-web <deepak-negi-web@noreply.git.sheetjs.com> |
||
---|---|---|
.. | ||
.npmignore | ||
01_version.js | ||
02_codepage.js | ||
03_consts.js | ||
04_base64.js | ||
05_buf.js | ||
09_types.js | ||
10_ssf.js | ||
11_ssfutils.js | ||
18_cfb.js | ||
19_fsutils.js | ||
20_jsutils.js | ||
21_ziputils.js | ||
22_xmlutils.js | ||
23_binutils.js | ||
24_hoppers.js | ||
25_cellutils.js | ||
26_cptable.js | ||
27_csfutils.js | ||
28_binstructs.js | ||
29_xlsenum.js | ||
30_ctype.js | ||
31_rels.js | ||
32_odmanrdf.js | ||
33_coreprops.js | ||
34_extprops.js | ||
35_custprops.js | ||
36_xlsprops.js | ||
38_xlstypes.js | ||
39_xlsbiff.js | ||
40_harb.js | ||
41_lotus.js | ||
42_sstxml.js | ||
43_sstbin.js | ||
44_offcrypto.js | ||
45_rtf.js | ||
46_stycommon.js | ||
47_styxml.js | ||
48_stybin.js | ||
49_theme.js | ||
50_styxls.js | ||
51_xlsbmeta.js | ||
51_xlsxmeta.js | ||
52_calcchain.js | ||
53_externlink.js | ||
54_drawing.js | ||
55_vml.js | ||
56_cmntcommon.js | ||
57_cmntxml.js | ||
58_cmntbin.js | ||
59_vba.js | ||
60_macrovba.js | ||
61_fcommon.js | ||
62_fxls.js | ||
63_fbin.js | ||
64_ftab.js | ||
65_fods.js | ||
66_wscommon.js | ||
67_wsxml.js | ||
68_wsbin.js | ||
69_chartxml.js | ||
70_csheet.js | ||
71_wbcommon.js | ||
72_wbxml.js | ||
73_wbbin.js | ||
74_xmlbin.js | ||
75_xlml.js | ||
76_xls.js | ||
77_parsetab.js | ||
78_writebiff.js | ||
79_html.js | ||
80_parseods.js | ||
81_writeods.js | ||
83_numbers.js | ||
84_defaults.js | ||
85_parsezip.js | ||
86_writezip.js | ||
87_read.js | ||
88_write.js | ||
90_utils.js | ||
95_api.js | ||
97_node.js | ||
98_exports.js | ||
99_footer.js | ||
00_header.js |