使用COM对象冻结Excel中的行 [英] Freezing rows in Excel using COM Object
本文介绍了使用COM对象冻结Excel中的行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好
我正在将网格的内容导出到Excel文档.我面临的问题是使用Com对象冻结行.我想冻结文档的前三行.我尝试使用下面的代码,但徒劳.任何人都可以在这方面提供帮助.在此先感谢
Hi All
I am exporting the contents of a grid to an Excel Document. The problem i am facing is with freezing the rows using a Com Object. I want to freeze top 3 rows of the document. I tried with the below code but in vain. Can anyone help in theis regard. Thanks in advance
oApp.Range("A1").Select
oApp.ActiveWindow.FreezePanes=True
推荐答案
您的代码中有错字. FreezrPanes应该是FreezePanes.
You got a typo in your code. FreezrPanes should be FreezePanes.
Range("A1").Select
ActiveWindow.FreezePanes = True
祝你好运!
Good luck!
这篇关于使用COM对象冻结Excel中的行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文