社区
其他
帖子详情
SetDefaultColWidth,SetCellTextStyle不起作用啊
xlt771111
2002-03-20 10:57:58
SetDefaultColWidth定义列宽怎么不起作用,还有SetCellTextStyle定义自动换行也不行,兄弟们给个答复啊,还有cell同志,跑哪里去了?
...全文
253
7
打赏
收藏
SetDefaultColWidth,SetCellTextStyle不起作用啊
SetDefaultColWidth定义列宽怎么不起作用,还有SetCellTextStyle定义自动换行也不行,兄弟们给个答复啊,还有cell同志,跑哪里去了?
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
7 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
xlt771111
2002-03-20
打赏
举报
回复
还是不行啊,老兄,GetColBestWidth可以把列宽值取出来,但SetColWidth设宽度没有用,你帮我看一下http://highway.dns2go.com:8030
用户名:xlt 密码:76114
Cell
2002-03-20
打赏
举报
回复
来了,来了!!
用GetColBestWidth先得到一个值,在用SetColWidth将宽度设上去。
要是太宽的话,用SetCellTextStyle将单元格设为自动换行,用GetRowBestHeight获得最佳的高度,再用SetRowHeight将高度设上就可以了。
xlt771111
2002-03-20
打赏
举报
回复
谢谢,已经解决了
whitecell
2002-03-20
打赏
举报
回复
既然设置了SetCellTextStyle为自动换行的话,还要麻烦您设置一下SetRowHeight,其实SetColWidth 就没什么用了。
例子1:
Cell1.SetColWidth 1, Cell1.GetColBestWidth(1), 1, 0
Cell1.ReDraw
例子2:
Cell1.SetCellTextStyle 1, 1, 0, 2
Cell1.SetRowHeight 1, Cell1.GetRowBestHeight(1), 1, 0
Cell1.ReDraw
VB使着方便,所以我没用VBS,抱歉!
xlt771111
2002-03-20
打赏
举报
回复
刚才机器重启了,现在可以了
xlt771111
2002-03-20
打赏
举报
回复
我的代码如下,请看一下:
<SCRIPT ID=clientEventHandlersVBS LANGUAGE=vbscript>
<!--
Sub button1_onclick
'form1.submit()
<%if count>0 then%>
DCellWeb1.setrows <%=count+2%>,0
DCellWeb1.SetCellTextStyle 5,49,1,2
DCellWeb1.PrintSetHead "" ,"日常事务纪录" ,""
DCellWeb1.PrintSetFoot "","日常事务纪录",""
DCellWeb1.S 1,1,"日期"
DCellWeb1.S 3,1,"发生事项"
DCellWeb1.S 5,1,"处理结果"
DCellWeb1.S 5,49,"处理结果"
<%for i=2 to count+2%>
'DCellWeb1.SetCellTextStyle 1,<%=i%>,1,2
'DCellWeb1.SetCellTextStyle 3,<%=i%>,1,2
'DCellWeb1.SetCellTextStyle 5,<%=i%>,1,2
DCellWeb1.S 1,<%=i%>,"<%=trim(s0(i-2))%>"
DCellWeb1.S 3,<%=i%>,"<%=trim(s1(i-2))%>"
DCellWeb1.S 5,<%=i%>,"<%=trim(s2(i-2))%>"
<%next%>
'DCellWeb1.readonly=true
colwidth1=DCellWeb1.GetColBestWidth(1)
colwidth3=DCellWeb1.GetColBestWidth(3)
colwidth5=DCellWeb1.GetColBestWidth(5)
'msgbox(colwidth3)
DCellWeb1.SetColWidth 1,colwidth1,1,1
DCellWeb1.SetColWidth 1,colwidth3,3,1
DCellWeb1.SetColWidth 1,colwidth5,5,1
DCellWeb1.PrintRange 0,0,0,0
DCellWeb1.PrintPara 1,1,1,1
DCellWeb1.PrintLabel 0,0
DCellWeb1.PrintPreview 1,DCellWeb1.GetCurSheet
<%else%>
msgbox("暂无纪录!")
<%end if%>
End Sub
Sub button2_onclick
DCellWeb1.PrintSheet 1,DCellWeb1.GetCurSheet
End Sub
-->
</SCRIPT>
Cell
2002-03-20
打赏
举报
回复
我上不去啊,还是来电话吧,010-68498479-107
jx
cell
开发简单实例
目前市场上有很多的excel的处理工具,...网上使用很少,资料很少,api文档虽然有,但是很多地方都非常的含糊,不知道属性具体用处是什么。 优点: 可以调用excel自带的公式及语法。生成对应的数据以及图表,这些...
使用jx
cell
创建表格设置行宽、背景色并进行自定义下载路径
set
Default
Col
Width
( 3000 ) ; //自定义设定单元格行宽 //标题
set
Text
AsValue(行,列,值); m_view .
set
Text
AsValue ( 1 , 1 , "客户" ) ; m_view .
set
Text
AsValue ( 1 , 2 , "服务经理" ) ; ...
基于Infragistics.Document.Excel导出表格的类
this.
Set
Default
Col
Width
(); } } #endregion #region [属性]页面设置(缩放) /// /// 页面设置(缩放) /// public int
Default
Zoom {
set
{ this.
default
Zoom = value; this.
Set
PageZoom(); } } #endregion #...
Luckysheet将excel导入生成对应的格式文件静态方法
记录
基于DTW(动态弯曲距离)-Kmeans的时间序列聚类分析模型(Matlab代码实现)
基于DTW(动态弯曲距离)-Kmeans的时间序列聚类分析模型(Matlab代码实现)
其他
256
社区成员
6,541
社区内容
发帖
与我相关
我的任务
其他
其他产品/厂家
复制链接
扫一扫
分享
社区描述
其他产品/厂家
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章