代码语言
.
CSharp
.
JS
Java
Asp.Net
C
MSSQL
PHP
Css
PLSQL
Python
Shell
EBS
ASP
Perl
ObjC
VB.Net
VBS
MYSQL
GO
Delphi
AS
DB2
Domino
Rails
ActionScript
Scala
代码分类
文件
系统
字符串
数据库
网络相关
图形/GUI
多媒体
算法
游戏
Jquery
Extjs
Android
HTML5
菜单
网页交互
WinForm
控件
企业应用
安全与加密
脚本/批处理
开放平台
其它
【
Domino
】
C/S模式下导出当前VIEW的数据到EXCEL
作者:
entry
/ 发布于
2014/7/25
/
1510
前提:机器上当然要状有EXCEL了将下面的代码直接放到VIEW的一个ACTION按钮上就行了 这个还包含了前一篇的进度条的功能
Sub Click(Source As Button) 'define Dim ws As New NotesUIWorkspace Dim se As New NotesSession Dim db As NotesDatabase Dim view As NotesView Dim entry As NotesViewEntry Dim iRow As Integer Dim iCol As Integer Dim oVal As String Dim vc As NotesViewEntryCollection Dim maxrows As Integer ' EXCEL Dim xlApp As Variant ' Excel Application Dim xlbook As Variant ' Workbook Dim xlsheet As Variant ' Worksheet 'get the data view Set db = se.CurrentDatabase Set view = ws.CurrentView.View If Messagebox("confirm to export the view data?", 32 + 1, "Exporting Data") <> 1 Then Exit Sub ' EXCEL Set xlApp = CreateObject("Excel.Application") xlApp.Visible = True Set xlbook = xlApp.Workbooks.Add Set xlsheet = xlbook.Worksheets(1) xlApp.ScreenUpdating = False Set vc = view.AllEntries Set entry = vc.GetFirstEntry 'titles xlsheet.Rows(1).NumberFormat = "@" iCol = 1 Forall col In view.Columns xlsheet.Cells(1, iCol).Value = col.Title iCol = iCol + 1 End Forall iRow = 2 maxrows = vc.Count 'Create the progress bar hwnd = NEMProgressBegin( NPB_TWOLINE ) 'Set the bar range - the default is 100 NEMProgressSetBarRange hwnd, maxrows 'Display some text on the dialog. The second line is ignored if NPB_TWOLINE not specified NemProgressSetText hwnd, "Exporting Data...", "" On Error Goto goout While Not(entry Is Nothing) 'update process bar's status & text NEMProgressSetBarPos hwnd, iRow-1 NemProgressSetText hwnd, "Exporting Data...", Cstr(iRow-1) &" record(s) have been processed..." iCol = 1 Forall colVal In entry.ColumnValues If Instr(Typename(colVal), "STRING") = 1 Then ' STRING or STRING( ) xlsheet.Cells(iRow, iCol).NumberFormat = "@" End If If Isarray(colVal) Then oVal$ = Implode(colVal, ",") Else oVal$ = Cstr(colVal) End If xlsheet.Cells(iRow, iCol).value = oVal iCol = iCol + 1 End Forall iRow = iRow + 1 Set entry = vc.GetNextEntry(entry) Wend 'save the Excel file xlApp.ActiveWorkbook.Worksheets(1).Rows.RowHeight=14 xlApp.ActiveWorkbook.Worksheets(1).Columns.AutoFit xlApp.ActiveWindow.FreezePanes = False xlApp.ActiveWindow.SplitRow = 1 xlApp.ActiveWindow.FreezePanes = True xlApp.ScreenUpdating = True goout: 'Destroy the dialog when we're done NEMProgressEnd hwnd Exit Sub End Sub
试试其它关键字
EXCEL
VIEW
同语言下
.
LotusDomino页面自动注册用户
.
多 Notes 文档中附件批量汇总到 Notes 文档中
.
多 Notes 文档中附件批量导出到本地系统
.
使用lotusscript获得群组中的用户列表_lotus notes
.
利用程序增加角色
.
关闭计算机
.
检验数字域
.
利用程序获取计算机名称及登陆用户名
.
清理收件夹的代理Code for CleanupInbox agent
.
邮箱中显示中文等价名
可能有用的
.
C#实现的html内容截取
.
List 切割成几份 工具类
.
SQL查询 多列合并成一行用逗号隔开
.
一行一行读取txt的内容
.
C#动态修改文件夹名称(FSO实现,不移动文件)
.
c# 移动文件或文件夹
.
c#图片添加水印
.
Java PDF转换成图片并输出给前台展示
.
网站后台修改图片尺寸代码
.
处理大图片在缩略图时的展示
entry
贡献的其它代码
(
10
)
.
生成WEB页面报表
.
Lotus中导出到EXCEL
.
l?o?t?u?s?数?据?用?j?a?v?a?程?序?导?入?导?出
.
通过web界面注册domino新用户
.
在linux下用脚本自动备份domino
.
notes数据导出到excel
.
把数字转化成中文大写
.
使用lotusscript发送mime格式邮件
.
lotus notes 数据库中附件的批量导出
.
C/S模式下导出当前VIEW的数据到EXCEL
Copyright © 2004 - 2024 dezai.cn. All Rights Reserved
站长博客
粤ICP备13059550号-3