Help!!!在DELPHI中利用TExeclApplication调用EXCEL文件,如何在指定行插入一行?(100分)

  • 主题发起人 主题发起人 KingTiger168
  • 开始时间 开始时间
K

KingTiger168

Unregistered / Unconfirmed
GUEST, unregistred user!
Dears :
I call an Execl file with a TExeclApplication control in Delphi,
But I can't inset a new row in the appointed row, Please send me
a warm-hand. Very Thanks!
 
插入一行:
ExcelApplication1.ActiveSheet.Rows[2].Insert;
插入一列:
ExcelApplication1.ActiveSheet.Columns[1].Insert;
 
I haved tried , but it didn't work!
Error :Undeclared identifier "Rows".
 
Hello fpshy and Shan Quan:
I call an Execl file with a TExeclApplication control in Delphi,
But I can't inset a new row in the appointed row, Please send me
a warm-hand. Very Thanks!
 
>>Set a Variant to the "ExeclApplication.ActiveSheet", then use the
>>variant.Rows[2].Insert
all right!!
哈!才发现,此问题发了四个帖子,
内容一样,可得双份了!
 
to linsb:
行吗?
to:KingTiger168
我目前有一个方法,不过我觉得有点繁,如果实在不知,我再说
 
to brainpower:
Linsb's is working right, But you can show your method to us .
Thank you!
 
后来我试过了,行。所以我那个方法就不用了(使用vba实现)
其实他的方法让我感到有点不解,即然他本身没有这个属性,为何赋给一个变量反而可以呢?
 
后退
顶部