以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- 字体控制问题 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=71517) |
-- 作者:HJG_HB950207 -- 发布时间:2015/7/13 12:37:00 -- 字体控制问题 在CHECKEDLINSTBOX 后面文件存盘时,如何控制电子表格里的字体(如宋体10号字)。原代码为: Book.Save("c:\\reports\\职工情况表.xls") Dim Proc As New Process Proc.File = "c:\\reports\\职工情况表.xls" Dim App As New MSExcel.Application Dim Wb As MSExcel.WorkBook = App.WorkBooks.Open("D:\\test.xls") Dim Ws As MSExcel.WorkSheet = Wb.WorkSheets(1) ws.Cells(1,1).font.Superscript = True app.visible = True |
-- 作者:大红袍 -- 发布时间:2015/7/13 14:19:00 -- Dim App As New MSExcel.Application Dim Wb As MSExcel.WorkBook = App.WorkBooks.Open("D:\\test.xls") Dim Ws As MSExcel.WorkSheet = Wb.WorkSheets(1) With Ws.UsedRange.Font .Name = "宋体" .Size = 20 End With app.visible = True |
-- 作者:HJG_HB950207 -- 发布时间:2015/7/13 14:43:00 -- 谢谢! |