http://technet.microsoft.com/zh-tw/library/microsoft.office.interop.excel.iwindow.displaygridlines(office.11).aspx
光给出来这个属性 ,也没说咋用 ,这不是坑爹呢嘛 ,找不到啥方法跟这属性相关呐
property Boolean DisplayGridlines{
Boolean get();
Void set(Boolean);
}
光给出来这个属性 ,也没说咋用 ,这不是坑爹呢嘛 ,找不到啥方法跟这属性相关呐
property Boolean DisplayGridlines{
Boolean get();
Void set(Boolean);
}
VC不能访问
Office Automation Using Visual C++
可以在Excel里面通过vba学习它的用法,然后翻译为VC++调用
我是这么做的 ,但是翻译的时候那些变量没有,感觉像是私有的变量
VC访问不了 ,而且也找不到这些变量对应的接口比如
ActiveWindow.DisplayGridlines = False
就是录制下来的宏
不知道如何用VC实现
Add class from File
c:\program files\microsoft office\office14\excel.exe
Add all classes
然后在solution里面找DisplayGridlines
D:\tmp\autoexcel\CWindow0.h(111): BOOL get_DisplayGridlines()
D:\tmp\autoexcel\CWindow0.h(117): void put_DisplayGridlines(BOOL newValue)
D:\tmp\autoexcel\CWorksheetView.h(46): BOOL get_DisplayGridlines()
D:\tmp\autoexcel\CWorksheetView.h(52): void put_DisplayGridlines(BOOL newValue) BOOL get_DisplayGridlines()
{
BOOL result;
InvokeHelper(0x285, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL);
return result;
}
void put_DisplayGridlines(BOOL newValue)
{
static BYTE parms[] = VTS_BOOL ;
InvokeHelper(0x285, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue);
}