就设置了下面这些属性,没有任何其他操作,预览窗口出来前居然需要3秒以上的时间,请问有没有什么优化方法。从Excel里可以看到,好像每执行一个属性赋值,Excel就重画一次,状态栏不停闪烁“就绪”,影藏Excel显示设置ScreenUpdating为False也没用,执行这些页面设置用时一样....表数据很小,唯一的要求就是按照格式打印出来,可这个速度真叫人郁闷了... wb.OlePropertyGet("PageSetup").OlePropertySet("PrintArea", AnsiString(strArea).c_str());// wb.OlePropertyGet("PageSetup").OlePropertySet("PrintHeadings", false); wb.OlePropertyGet("PageSetup").OlePropertySet("BlackAndWhite", true); wb.OlePropertyGet("PageSetup").OlePropertySet("PaperSize", 9); wb.OlePropertyGet("PageSetup").OlePropertySet("Zoom", false);
wb.OlePropertyGet("PageSetup").OlePropertySet("FitToPagesWide", 1);
wb.OlePropertyGet("PageSetup").OlePropertySet("FitToPagesTall", 1); // 1纵向,2横向
wb.OlePropertyGet("PageSetup").OlePropertySet("Orientation", Orientation); wb.OlePropertyGet("PageSetup").OlePropertySet("CenterHorizontally", true);
wb.OlePropertyGet("PageSetup").OlePropertySet("CenterVertically", false); wb.OlePropertyGet("PageSetup").OlePropertySet("LeftMargin", 0.3);
wb.OlePropertyGet("PageSetup").OlePropertySet("RightMargin", 0.3);
wb.OlePropertyGet("PageSetup").OlePropertySet("TopMargin", 0.3);
wb.OlePropertyGet("PageSetup").OlePropertySet("BottomMargin", 0.3);
wb.OlePropertyGet("PageSetup").OlePropertySet("HeaderMargin", 0.3);
wb.OlePropertyGet("PageSetup").OlePropertySet("FooterMargin", 0.3);
wb.OlePropertyGet("PageSetup").OlePropertySet("FitToPagesWide", 1);
wb.OlePropertyGet("PageSetup").OlePropertySet("FitToPagesTall", 1); // 1纵向,2横向
wb.OlePropertyGet("PageSetup").OlePropertySet("Orientation", Orientation); wb.OlePropertyGet("PageSetup").OlePropertySet("CenterHorizontally", true);
wb.OlePropertyGet("PageSetup").OlePropertySet("CenterVertically", false); wb.OlePropertyGet("PageSetup").OlePropertySet("LeftMargin", 0.3);
wb.OlePropertyGet("PageSetup").OlePropertySet("RightMargin", 0.3);
wb.OlePropertyGet("PageSetup").OlePropertySet("TopMargin", 0.3);
wb.OlePropertyGet("PageSetup").OlePropertySet("BottomMargin", 0.3);
wb.OlePropertyGet("PageSetup").OlePropertySet("HeaderMargin", 0.3);
wb.OlePropertyGet("PageSetup").OlePropertySet("FooterMargin", 0.3);
解决方案 »
- pcomm过滤数据问题
- MSSQLSERVER可以存入WORD,EXCEL文档,能不能存入PDF文档,如行,方法是不是一样?
- ★★★留個QQ,相互學習,共同进步!★★★
- TForm的OnClose事件和OnDestroy事件有何区别?
- 把BDE全部换成AD0 CONECTION的动态生成连接字符串,
- ssl加密带证书的站点,如何自动登录,网址在贴子里
- 用英文操系统的兄弟,赚分的机会来了。
- XE5 开发IOS真机调试需要越狱么?
- 那位高手可以给一个进程保护的例子啊 急求在线等
- 在ReportBuilder中如何实现保存报表?
- TObjectList是可以用随便自定义的类吗?
- 2012年6月Delphi大论坛月专家榜本人排名第三,为何没有蓝色的花花
把1表内容拷贝到2表打印,速度都比设置上面这些PageSetup参数快.....