Excel单元格默认度量单位 [英] Excel cell default measure unit

查看:71
本文介绍了Excel单元格默认度量单位的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Excel单元格大小的默认度量单位是什么?是还是像素还是毫米?

What is the default measurement unit of Excel cell size? Is it Point or Pixel or Millimeter ?

默认情况下,excel单元格行高 15 ,此值的含义是什么?是 15个像素还是 15个点

By default, excel cell Row height is 15, what is the meaning of this value? Is it 15 Pixels or 15 Points

默认情况下,excel单元格的列宽为8.43,此值的含义是什么?是 8.43像素还是 8.43像素

By default, excel cell Column Width is 8.43, what is the meaning of this value? Is it 8.43 Pixels or 8.43 Points

如果行和列单位都相同,则行高应小于列宽.但是测量是相反的,行高显示的数字大于列宽.同样在单元格外观"中,行小于列宽.

If both row and column units are same, then Row height should be smaller than to column width. But the measurement is reverse, row height shows bigger number than column width. In Cell appearance also, row is small than column width.

我需要创建一个框,框的高度为90毫米(毫米),宽度为195毫米(毫米).请让我知道要在行"和列"文本框中输入哪些值.

I need to create box with Height 90 mm (millimeter) and Width 195 mm (millimeter). Please let me know what are values to be put in Row and Column textboxes.

谢谢.

推荐答案

通过GUI访问时,列和行的默认单位确实不同.

The default units for column and row are indeed different when accessed through the GUI.

在GUI中显示的列宽是指 Range.ColumnWidth 属性,其中一列宽等于标准样式中一个字符的宽度.对于比例字体,使用字符0(零)的宽度(

The displayed column width in the GUI refers to the Range.ColumnWidth property, where One unit of column width is equal to the width of one character in the Normal style. For proportional fonts, the width of the character 0 (zero) is used (source). This means as you change the worksheet style, your column width may change too.

但是,高度以点为单位显示正常高度.

The height, however, displays a normal height in points.

在VBA中,您既可以获取与字体相关的单位,又可以获取宽度的法线单位.对于高度,您只能获取以磅为单位的值:

In VBA, you can both get both this font-related unit, and the normal point unit for the width. For the height, you can only get the value in points:

Debug.Print Range("A1").ColumnWidth '8.43 characters wide by default
Debug.Print Range("A1").Width '48 points wide by default
Debug.Print Range("A1").Height '12.75 points high by default

当然,您可以计算字符宽度和点之间的转换系数: Range("A1").Width/Range("A1").ColumnWidth = 5.69当使用Arial,10 pt时.这意味着如果要使用195mm x 90mm的尺寸,则需要输入97.0777作为列宽,如果使用Arial,则需要输入255.118作为列高,正常样式为10 pt.

Of course, you can calculate a conversion factor between character width and points: Range("A1").Width / Range("A1").ColumnWidth = 5.69 when using Arial, 10 pt. This means that if you want to have a size of 195mm by 90mm, you need to enter 97.0777 as column width, and 255.118 as column height if you're using Arial, 10 pt as normal style.

这篇关于Excel单元格默认度量单位的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆