- r->sheets[r->sheet_index].start_row = r->row;
- // printf ("%s:%d Cell contents: Rows %d\n", __FILE__, __LINE__, r->row);
- /* if (XML_READER_TYPE_TEXT != r->node_type) */
+ r->sheets[r->sheet_index].start_row = r->row - 1;
+
+ if (
+ (r->sheets[r->sheet_index].start_col == -1)
+ ||
+ (r->sheets[r->sheet_index].start_col >= r->col - 1)
+ )
+ r->sheets[r->sheet_index].start_col = r->col - 1;
+
+ r->sheets[r->sheet_index].stop_row = r->row - 1;
+
+ if ( r->sheets[r->sheet_index].stop_col < r->col - 1)
+ r->sheets[r->sheet_index].stop_col = r->col - 1;
+