在 Excel 中隐藏分页符
我实现了一系列复选框,用户可以使用这些复选框隐藏/取消隐藏数据范围。 这太棒了——它有效。 问题是当用户进行打印时 - 隐藏数据被隐藏,但页面仍然存在但空白。
如果分页符留给自己的设备,那么一切都很好 - 没有空白部分。 当使用手动分页符时,您可以看到数据在哪里。
我已经尝试了一切方法来消除空白区域。
复制范围并重新计算分页符是不行的,因为对于相当小的报告来说,分页符需要花费 2 分钟以上的时间。
那么,如何只打印未隐藏的范围?
谢谢,G.
Following on from my previous questions:
I have implemented a series of checkboxes with which users can hide/unhide ranges of data. This is great - it works. The problem is when the users go to print - the hidden data is hidden but the pages are still there but blank.
If the page breaks are left to their own devices then everything is fine - there are no blank sections. When manual page breaks are used then you can see where the data was.
I've tried everything to get rid of the blank areas.
Copying the ranges and recalculating the page breaks is a no-go as the page breaks take upwards of 2 minutes for a fairly small report.
So, how can I print only the ranges that aren't hidden?
Thanks, G.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
尚未测试,但您可以将打印范围更改为仅可见单元格:
Haven't tested it, but you could change the print range to only the visible cells:
Excel 默认情况下仅打印可见单元格。 您不必像之前建议的那样将打印区域设置为可见单元格。
我想您已经取消选中所有复选框中的打印对象选项。 当您打印该表时,该区域显示为空白。 如果是这种情况,请继续阅读:
我建议编写一个简单的宏来隐藏包含复选框的行。 将复选框的可见属性设置为 false。 打印该表,然后将所有内容恢复到原始状态。
或者,您可以只选择复选框上方的行,然后选择复选框下方的整个区域,然后将其设置为打印区域。 这应该可以解决您遇到的问题。
另外,我可能严重误解了情况,在这种情况下,我很抱歉浪费了您的时间。
Excel, by default prints only visible cells. You wouldnt have to set the Print area to visible cells as previously suggested.
I suppose you have un-checked the Print Object option in all of the Check-boxes. And that area appears blank, when you print the sheet. If that is the case, read on:
I suggest writing a simple macro that hides the rows that contain the check boxes. Set the visible property of the check boxes to false. Print the sheet, and then return everything back to the original state.
Alternatively, you could just select the rows above the check boxes, then the entire area below the check boxes, and then set that as the PrintArea. That should solve the problem you are having.
Also, I may have wildly misunderstood the situation, in which case, I am sorry I wasted your time.