GNOME Bugzilla – Bug 700994
Print Range incorrectly includes hidden cells
Last modified: 2013-05-27 02:57:42 UTC
Fill A1:A1000 with random numbers Hide column A set C3 to "Hello World" print preview Note that the print preview consists of about 24 sheets when 1 should suffice. The hidden column is considered par to the print range and increases it unnecessarily.
We have: /** * sheet_get_extent: * @sheet: the sheet * @spans_and_merges_extend: optionally extend region for spans and merges. * * calculates the area occupied by cell data. * * NOTE: When spans_and_merges_extend is TRUE, this function will calculate * all spans. That might be expensive. * * NOTE: This refers to *visible* contents. Cells with empty values, including * formulas with such values, are *ignored. * * Return value: the range. **/ sheet_get_extent seems to exclude cells with empty values, including formulas with such values but does include cells that are hidden. We are using sheet_get_extent for various exporters that as a consequence export hidden cells. I assume that this may be desired, although I could imagine that some users may prefer that hidden content would not be exported. As a consequence I think we should provide a second function to only calculate the extent of non-hidden cells.
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.