识别边框样式单元格 Excel
我试图找出我收到的工作簿中单元格的特定边框样式。执行此操作的正常方法是 ctrl+1->Border 并查看样式。然而,这个特定单元格的样式被清空,我怀疑边框是使用专有样式格式化的。如何获取此边框样式的属性(我猜是使用 VBA?),以便设置我自己的宏,然后将该特定边框样式应用于其他单元格?
我希望有人能在这里帮助我。
编辑:
I'm trying to figure out the particular border style of cell within a workbook that I received. The normal way to do this would be ctrl+1->Border and look at the style. However, the style for this particular cell is blanked out and I suspect that the border is formatted using a proprietary style. How do I get the properties of this border style (I guess with VBA?) in order to set up my own macro which then applies this particular border style to other cells?
I hope someone can help me out here.
EDIT:
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在 Excel 中,选择具有相关边框的单元格。
更改为 VBE 环境 (Alt+F11)。打开立即窗口 (Ctrl+G)。
在立即窗口中输入:
并将
值与文档进行比较:
https://learn.microsoft.com/en-us/ Office/vba/api/excel.xllinestyle
https://learn.microsoft.com/en-us/ office/vba/api/excel.xlborderweight
如果在列表中找不到这两个值之一,我会感到惊讶。
In Excel, select the cell with the border in question.
Change to the VBE environment (Alt+F11). Open the Immediate Window (Ctrl+G).
Type in the immediate window:
And
Compare the values with the documentation:
https://learn.microsoft.com/en-us/office/vba/api/excel.xllinestyle
https://learn.microsoft.com/en-us/office/vba/api/excel.xlborderweight
It would surprise me it one of the two values cannot be found in the lists.
我相信您需要在单元格的左侧和右侧添加粗体白色边框才能产生效果。
I believe you need to add bold white borders to the left and right-hand sides of the cell to generate the effect.