找回密码
 立即注册

QQ登录

只需一步,快速开始

崂山贫农

注册会员

7

主题

24

帖子

73

积分

注册会员

积分
73

活字格认证

崂山贫农
注册会员   /  发表于:2017-4-14 11:22  /   查看:3278  /  回复:4
请问C1.C1Excel.XLPrintSettings   支持设置页眉样式吗
C1.C1Excel.XLPrintSettings  ps =new XLPrintSettings();
ps.Header="页眉"

excel页眉设置里有三个位置可以设置
一般是  左  中   右三个位置
在C1excel里只能设置header   就是中间位置
请问其它两个位置的页眉如何设置



另外有设置页眉样式的功能吗?在excel里页眉的字体等是可以编辑的,但在c1excel里没有找到相关信息

4 个回复

倒序浏览
Alice
社区贡献组   /  发表于:2017-4-14 14:57:14
沙发
你可以参考下这个Demo,对标题的打印设置。

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
请点击评分,对我的服务做出评价!  5分为非常满意!

葡萄城控件服务团队

官方网站: http://www.gcpowertools.com.cn
回复 使用道具 举报
崂山贫农
注册会员   /  发表于:2017-4-14 15:37:17
板凳
Alice 发表于 2017-4-14 14:57
你可以参考下这个Demo,对标题的打印设置。

谢谢
回复 使用道具 举报
崂山贫农
注册会员   /  发表于:2017-4-14 15:43:13
地板
Alice 发表于 2017-4-14 14:57
你可以参考下这个Demo,对标题的打印设置。

我在自带的例子里找到了
sheet.PrintSettings.Header = "&LCanada:&G&D&CHeader Center&R&P";
主要是这句,字体能设置吗   我字体改不了
回复 使用道具 举报
Alice
社区贡献组   /  发表于:2017-4-17 09:54:14
5#
崂山贫农 发表于 2017-4-14 15:43
我在自带的例子里找到了
sheet.PrintSettings.Header = "&LCanada:&G&D&CHeader Center&R&P";
主要是这 ...

Header和Footer能识别一些特殊的由“&”开头的字符串,这是Excel定义,不是由C1Excel决定。
这些字符串包括:
&L Start of the left section
&C Start of the centred section
&R Start of the right section
&P Current page number
&N Page count
&D Current date
&T Current time
&A Sheet name
&F File name without path
&Z File path without file name
&G Picture (file name)
&B Bold toggle
&I Italic toggle
&U Underline toggle
&E Double underle toggle
&S Strikeout toggle
&X Superscript toggle
&Y Subscript toggle
&"[fontname]" Set new font
&"[fontname,fontstyle]" Set new font with specified style. The style is in
most cases "Regular", "Bold", "Italic", or "Bold Italic".
&[fontheight] Set font height in points.
请点击评分,对我的服务做出评价!  5分为非常满意!

葡萄城控件服务团队

官方网站: http://www.gcpowertools.com.cn
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 立即注册
返回顶部