以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- 保存电子表格格式问题 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=71661) |
-- 作者:HJG_HB950207 -- 发布时间:2015/7/15 18:12:00 -- 保存电子表格格式问题 请教在如下代码后,加上哪些代码,才能将所选列保存为含有多层表头的电子文件。谢谢 Dim dt As Table = Tables("职工一览表") Dim Book As New XLS.Book Dim Sheet As XLS.Sheet = Book.Sheets(0) For i As Integer = 0 To nms.count -1 Sheet(0, i).Value = nms(i) Next For r As Integer = 0 To dt.Rows.Count - 1 \'填入数据 For i As Integer = 0 To nms.count -1 Sheet(r + 1, i).Value = dt.rows(r)(nms(i)) Next Next |
-- 作者:大红袍 -- 发布时间:2015/7/15 19:17:00 -- 参考 http://www.foxtable.com/help/topics/1971.htm
|