怎样设置excel的打印设置? 如:纸张类型及打印方向等!请给出源码,特急 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 你可以调用API设置和在excel设置是一样的 huojiehai(海天子),可以具体说一说吗? 你也可以用dialogs页的控件的Tpagesetupdialog\TPrintDialog\TPrinterSetupDialog 我想用这样的语句:eclapp.activesheet.PageSetup.Orientation:=poLandscape;进行设置,不过不对,虽然不出错,但没有产生效果,应该怎么办呢? excelworksheet2.PageSetup.Orientation:=XLLANDSCAPE;excelworksheet2.PageSetup.PaperSize:=XLPAPERA4;纸张为A4,方向为横向,可参看OFFICE的VBA帮助 Sheet.PageSetup.CenterFooter := '&"宋体,加粗"&28&P'; --------- ------------ --------- -- -- 页脚设置 居中文字 字体 大小 P代表第几页 LeftFooter 28为字体大小 居左文字 RightFooter 居右文字 页脚倒是没用过不过我录制一段宏也许对你有帮助 With ActiveSheet.PageSetup .LeftHeader = "" .CenterHeader = "" .RightHeader = ""----------------------------------------------------------- .LeftFooter = "&""黑体,常规""ABCD"------------------------------------------------------------- .CenterFooter = "" .RightFooter = "" .LeftMargin = Application.InchesToPoints(0.75) .RightMargin = Application.InchesToPoints(0.75) .TopMargin = Application.InchesToPoints(1) .BottomMargin = Application.InchesToPoints(1) .HeaderMargin = Application.InchesToPoints(0.5) .FooterMargin = Application.InchesToPoints(0.5) .PrintHeadings = False .PrintGridlines = False .PrintComments = xlPrintNoComments .PrintQuality = 600 .CenterHorizontally = False .CenterVertically = False .Orientation = xlPortrait .Draft = False .PaperSize = xlPaperA4 .FirstPageNumber = xlAutomatic .Order = xlDownThenOver .BlackAndWhite = False .Zoom = 100 End With XL.ActiveSheet.PageSetup.PaperSize := xlPaperA3; //纸张 Xl.ActiveSheet.PageSetup.Orientation := xlLandscape; //纸张方向 Xl.ActiveSheet.PageSetup.CenterHorizontally := True; //是否居中打印 XL.ActiveSheet.PageSetup.TopMargin := 20; //上边距 XL.ActiveSheet.PageSetup.BottomMargin := 30; //下边距 XL.ActiveSheet.PageSetup.LeftMargin := 20; //左边距 XL.ActiveSheet.PageSetup.RightMargin := 20; //右边距其中Xl为CreateOleObject('Excel.Application') 接口与抽象类的区别是什么? 911了,散散分 哈哈哈哈....人生快乐莫过于找到一条路... 一个拗口的问题,想法也很奇怪,求一个技巧性的代替线程或内核对象等待的方法. 关于DateTimePicker控件的使用问题? 关于High()函数的问题 求 大虾 指导啊 关于VB播放器 显示总时间的问题 !!!!!!!!!!!!!! 我想与条形码扫描连接如何做(delphi7)? 谈谈您对delphi帮助文件的感受如何??? 两个表之间的统计 在线等待:!!!!急!!怎么直接在dbgrid点机每列记录名称时,就可以排序!!! delhpi的问题
excelworksheet2.PageSetup.PaperSize:=XLPAPERA4;
纸张为A4,方向为横向,可参看OFFICE的VBA帮助
--------- ------------ --------- -- --
页脚设置 居中文字 字体 大小 P代表第几页
LeftFooter 28为字体大小
居左文字
RightFooter
居右文字
.LeftHeader = ""
.CenterHeader = ""
.RightHeader = ""
-----------------------------------------------------------
.LeftFooter = "&""黑体,常规""ABCD"
-------------------------------------------------------------
.CenterFooter = ""
.RightFooter = ""
.LeftMargin = Application.InchesToPoints(0.75)
.RightMargin = Application.InchesToPoints(0.75)
.TopMargin = Application.InchesToPoints(1)
.BottomMargin = Application.InchesToPoints(1)
.HeaderMargin = Application.InchesToPoints(0.5)
.FooterMargin = Application.InchesToPoints(0.5)
.PrintHeadings = False
.PrintGridlines = False
.PrintComments = xlPrintNoComments
.PrintQuality = 600
.CenterHorizontally = False
.CenterVertically = False
.Orientation = xlPortrait
.Draft = False
.PaperSize = xlPaperA4
.FirstPageNumber = xlAutomatic
.Order = xlDownThenOver
.BlackAndWhite = False
.Zoom = 100
End With
//纸张
Xl.ActiveSheet.PageSetup.Orientation := xlLandscape;
//纸张方向
Xl.ActiveSheet.PageSetup.CenterHorizontally := True;
//是否居中打印
XL.ActiveSheet.PageSetup.TopMargin := 20;
//上边距
XL.ActiveSheet.PageSetup.BottomMargin := 30;
//下边距
XL.ActiveSheet.PageSetup.LeftMargin := 20;
//左边距
XL.ActiveSheet.PageSetup.RightMargin := 20;
//右边距其中Xl为CreateOleObject('Excel.Application')