excel修改事实打印预览
I ran into an odd problem with images in Excel 2010 last week – after looking at the sheet in Preview, a small logo graphic grew big enough to cover the most of the data on the sheet! Have you run into the problem where Excel images change size after Preview?
上周,我在Excel 2010中遇到了一个图像奇怪的问题-在“预览”中查看工作表后,一个小的徽标图形变得足够大,可以覆盖工作表中的大部分数据! 您是否遇到过预览后Excel图像更改大小的问题?
之前和之后 (Before and After)
Here’s how my company logo image looked before the Preview – just a nice, small-sized logo, at the top left of the sheet.
这是预览之前我的公司徽标图像的外观–表格左上方只是一个漂亮的小型徽标。
Here is a screen shot of the logo image after the Preview. That is not what I wanted it to look like!
这是预览后徽标图像的屏幕截图。 那不是我想要的样子!
检查图片设置 (Check the Picture Settings)
The first thing I did was check the picture settings – right-click on the picture, and click Size and Properties
我要做的第一件事是检查图片设置–右键单击图片,然后单击“大小和属性”
Then, in the Properties category, make sure the image is set to “Don’t move or size with cells.”
然后,在“属性”类别中,确保将图像设置为“不要移动或调整单元格大小”。
That setting was okay, so I didn’t know why the size changed. I Googled, but that didn’t help – the only suggestions were to check the image properties.
那个设置还可以,所以我不知道为什么尺寸改变了。 我用Google搜索,但这没有帮助-唯一的建议是检查图像属性。
粘贴到新图片中 (Paste in a new picture)
There was a copy of the logo on another sheet in the file, so I deleted the oversized one, and pasted in a new copy.
文件的另一张纸上有徽标的副本,因此我删除了超大的徽标,然后粘贴到新副本中。
Yikes! The new copy looked just as big as the oversized one, even though it was the correct size on the sheet where I’d copied it.
kes! 新副本看起来和超大副本一样大,即使它是我复制纸张的正确尺寸。
I tried deleting and copying a few more times, and the result was the same each time. Also, I found that the problem occurred whether I manually opened the Print Preview window, or used VBA to open it.
我尝试了几次删除和复制,每次的结果都是相同的。 另外,我发现无论是手动打开“打印预览”窗口还是使用VBA来打开它,都会出现问题。
消失的画面 (The Disappearing Picture)
Finally, I noticed something odd, as I pasted the logo onto the problem sheet – after I pasted, I had to zoom out a bit, to find the pasted picture.
最终,当我将徽标粘贴到问题表上时,我发现了一些奇怪的地方–粘贴后,我不得不缩小一点以找到粘贴的图片。
When I could see the pasted picture, it was the right size, instead of oversized. But, it was in the range of cells where it should have been visible, without zooming.
当我看到粘贴的图片时,它是正确的尺寸,而不是过大的尺寸。 但是,它应该在不缩放的情况下在单元格范围内可见。
The picture disappeared after pasting, and only appeared when I zoomed. This was getting stranger and stranger!
图片在粘贴后消失了,仅在缩放后才出现。 这越来越陌生了!
更改缩放 (Change the Zoom)
I tried previewing again, and the image got larger, just as it did before. But this time, I didn’t delete the picture, I just increased the zoom level, from 100% to 110%. The picture immediately went back to the correct size, and stayed that size, when I put the zoom back to 100%.
我再次尝试预览,图像变大了,就像以前一样。 但是这次,我没有删除图片,只是将缩放级别从100%增加到110%。 当我将缩放比例放回100%时,图片立即回到正确的尺寸,并保持该尺寸。
I don’t know why the problem occurred, but I added a bit of code to the project, to increase the zoom level, then set it back to the previous zoom setting.
我不知道为什么会出现此问题,但是我向项目添加了一些代码,以提高缩放级别,然后将其设置回先前的缩放设置。
Here is the code that I used, just in case you run into a similar problem.
这是我使用的代码,以防万一您遇到类似的问题。
lZoom = ActiveWindow.Zoom
ActiveWindow.Zoom = lZoom + 10
ActiveWindow.Zoom = lZoom
And if you’ve ever run into this, and know what causes the oversized images, please let me know!
如果您曾经遇到过这种情况,并且知道是什么原因导致图像过大,请告诉我!
翻译自: https://contexturesblog.com/archives/2014/03/25/excel-images-change-size-after-preview/
excel修改事实打印预览