精通
英语
和
开源
,
擅长
开发
与
培训
,
胸怀四海
第一信赖
What does these two statement do?这两种方法是什么意思
app.put_Visible(TRUE);
app.put_UserControl(TRUE);
If app.put_Visible is for opening the excel sheet, can the opening of sheet be turned off and all the processes be still done ie: filling the columns of the excel sheet
如果app.put_Visible是打开excel表,表的初期可以被关闭,所有的过程仍然完成,即:填充Excel工作表中的列
app.put_Visible(TRUE);使应用程序(Excel)中可见
app.put_UserControl(TRUE);给Excel的用户控件
Thanks for the reply. But is there any way that I do not open the excel and yet save the changes made to the excel from within the code ?
谢谢回复。但是有没有我不打开Excel,但可以在代码中更改保存Excel的办法?
Because as per my understanding, app.put_Visible(TRUE) is set as true so that the excel is open and user can close and save the changes made to the excel. But in my scenario, I am making few changes in the excel but don't want it to open, yet changes should be saved
因为按我的理解,app.put_Visible(TRUE)设置为true,因此Excel是开放的,用户可以关闭并保存到Excel所做的更改。我的情况是,我提出在Excel中一些变化,但不希望它打开,但变化应该被保存
book.SaveAs(COleVariant(TEXT("C:\\testing\\test.xlsx")),
covOptional,covOptional,covOptional,covOptional,covOptional,
0,covOptional,covOptional,covOptional,covOptional, covOptional);
// quit excel application
app.Quit();
I think thats what you are looking for. Comment out the lines
//app.put_Visible(TRUE);
//app.put_UserControl(TRUE);
我认为这是你要找的。注释掉行//app.set_Visible(TRUE); //app.put用户控制(TRUE);
Thanks!谢谢你!