198 Lotus blogs updated hourly. Who will post next? Home | Blogs | Search | About 
 
Latest 7 Posts
Create a Responsive Bootstrap Carousel Touch Slider with Text Animation in XPages
Thu, Oct 19th 2017 61
Using infoBox a Tooltip Style jQuery Plugin in XPages
Wed, Oct 18th 2017 127
Using Bringins in XPages for Animated Info Pages
Wed, Oct 18th 2017 151
IBM Notes 9.0.1 Feature Pack 9 Interim Fix 1 Available for download on IBM Fix Central
Sat, Oct 14th 2017 147
Create Animated Progress Circles in XPage using Circliful
Fri, Oct 13th 2017 178
IBM Domino 9.0.1 Feature Pack 9 Interim Fix 2 Available on IBM Fix Central
Fri, Oct 13th 2017 231
IBM JUMP Session - The Connections Catalog: Integrating 3rd Party Apps For More Business Value
Fri, Oct 13th 2017 108
Top 10
IBM Domino 9.0.1 Feature Pack 9 Interim Fix 2 Available on IBM Fix Central
Fri, Oct 13th 2017 231
Create Animated Progress Circles in XPage using Circliful
Fri, Oct 13th 2017 178
Using Bringins in XPages for Animated Info Pages
Wed, Oct 18th 2017 151
IBM Notes 9.0.1 Feature Pack 9 Interim Fix 1 Available for download on IBM Fix Central
Sat, Oct 14th 2017 147
Using Smoke Form Validation And Components for Bootstrap in XPages Part 3 - Easy, Simple and Safer Form Validation
Thu, Oct 12th 2017 127
Using infoBox a Tooltip Style jQuery Plugin in XPages
Wed, Oct 18th 2017 127
IBM JUMP Session - The Connections Catalog: Integrating 3rd Party Apps For More Business Value
Fri, Oct 13th 2017 108
It's IBM Champion Season! Nominations are open!
Tue, Oct 10th 2017 75
Create a Responsive Bootstrap Carousel Touch Slider with Text Animation in XPages
Thu, Oct 19th 2017 61
IBM Domino and IBM Notes 9.0.1 FP7 available for download on IBM Fix Central
Tue, Sep 13th 2016 35


IBM Notes Tip: Export Data to Excel (CSV) using LotusScript Agents
Twitter Google+ Facebook LinkedIn Addthis Email Gmail Flipboard Reddit Tumblr WhatsApp StumbleUpon Yammer Evernote Delicious
   


During the past period I received several questions how to export all Notes data corresponding to a specific Notes Form to Excel (CSV) using a LotusScript Agent. In the example below a possible solution to export all data associated with a specific Notes Form to Excel using a LotusScript agent. In the second example a possible solution to export all data from all forms in the Notes database to Excel using a LotusScript agent. For each form a separate Excel file will be created.

A. LotusScript Agent Export Data based on FormName

Sub Initialize
Dim session As New NotesSession
Dim db As NotesDatabase
Dim fileName As String
Dim fileNum As Integer
Dim headerstring As String
Dim values As String
Dim selection As String
Dim collection As NotesDocumentCollection
Dim doc As NotesDocument
On Error Resume Next
Set db = session.CurrentDatabase
ForAll form In db.Forms
If IsEmpty(form.Fields) Then
MessageBox form.Name & " has no fields"
Else
'Export Form
Dim fieldcount As Integer
Dim msgString As String        
If form.Name = "FORMNAME" Then          
fieldCount = 0
msgString = ""
fileNum% = FreeFile()
fileName$ = "c:tempexport" & form.Name & ".csv"
Open FileName$ For Output As fileNum%
ForAll Field In form.Fields
msgString = msgString & Chr(10) & _
"" & Field
fieldCount = fieldCount + 1
headerstring=headerstring & |"| &Field &|",|
End ForAll
Write #fileNum%,  |",| & headerstring & |"|
headerstring=""
Else
End If
End If
selection = |Form="| & form.Name & |"|
Set collection=db.Search(selection, Nothing, 0)
Dim newvalue As Variant
Set doc = collection.GetFirstDocument
Do Until (doc Is Nothing)
values=""
ForAll formfield In form.Fields
newvalue=doc.GetItemValue(formfield)
values=values & |"| & newvalue(0) & |",|
End ForAll
Write #fileNum%,  |",| & values &|"|
values=""
Set doc = collection.GetNextDocument(doc)
Loop
'Check Aliases
ForAll aliaz In form.Aliases
If aliaz = form.Name Then
GoTo NextAliaz   'alias is same as form name
End If
selection = |Form="| & aliaz & |"|
Set collection=db.Search(selection, Nothing, 0)
Set doc = collection.GetFirstDocument
Do Until (doc Is Nothing)
values=""
ForAll formfield In form.Fields
newvalue=doc.GetItemValue(formfield)
values=values & |"| & newvalue(0) & |",|
End ForAll
Write #fileNum%,  |",| & values &|"|
values=""
NextAliaz:
Set doc = collection.GetNextDocument(doc)
Loop
End ForAll
Close fileNum%
End ForAll
End Sub

B. LotusScript Agent Export Data All Forms in Notes Database

Sub Initialize
Dim session As New NotesSession
Dim db As NotesDatabase
Dim fileName As String
Dim fileNum As Integer
Dim headerstring As String
Dim values As String
Dim selection As String
Dim collection As NotesDocumentCollection
Dim doc As NotesDocument
On Error Resume Next
Set db = session.CurrentDatabase
ForAll form In db.Forms
If IsEmpty(form.Fields) Then
MessageBox form.Name & " has no fields"
Else
Dim fieldCount As Integer
Dim msgString As String
fieldCount = 0
msgString = ""
fileNum% = FreeFile()
fileName$ = "c:tempexport" & form.Name & ".csv"
Open FileName$ For Output As fileNum%
ForAll Field In form.Fields
msgString = msgString & Chr(10) & _
"     " & Field
fieldCount = fieldCount + 1
headerstring=headerstring & |"| &Field &|",|
End ForAll
Write #fileNum%,  |",| & headerstring & |"|
headerstring=""
End If
selection = |Form="| & form.Name & |"|
Set collection=db.Search(selection, Nothing, 0)
Dim newvalue As Variant
Set doc =collection.GetFirstDocument
Do Until (doc Is Nothing)
values=""
ForAll formfield In form.Fields
newvalue=doc.GetItemValue(formfield)
values=values & |"| & newvalue(0) & |",|
End ForAll
Write #fileNum%,  |",| & values &|"|
values=""
Set doc = collection.GetNextDocument(doc)
Loop
Close fileNum%
End ForAll
End Sub

---------------------
http://xpagesandmore.blogspot.com/2017/03/ibm-notes-tip-export-data-to-excel-csv.html
Mar 13, 2017
6 hits



Recent Blog Posts
61
Create a Responsive Bootstrap Carousel Touch Slider with Text Animation in XPages
Thu, Oct 19th 2017 10:51a   Johnny Oldenburger
In my continuous search for modern plugins for my XPages applications I came across the Bootstrap Carousel Touch Slider with Text Animation plugin. The plugin is adding touch behavior to Bootstrap's Carousel and adds beautiful animations in text slides. It is possible to use all text animations from animate.css. The only thing needed is to include the library on an XPages or Custom Control and create the carousel components as described in the official Bootstrap documentation. The JavaScript an
127
Using infoBox a Tooltip Style jQuery Plugin in XPages
Wed, Oct 18th 2017 2:57p   Johnny Oldenburger
In my continuous search for modern plugins for my XPages applications I came across infoBox. infoBox is a tooltip style jQuery plugin to create information signs/icons on your XPage which will show information boxes on mouseover. The created information boxes will resemble the conversation/message boxes. These boxes will be aligned perfectly without moving out of the page unless a larger width for the box is specified. Options width: specify a width for the information Box. The default width wi
151
Using Bringins in XPages for Animated Info Pages
Wed, Oct 18th 2017 11:59a   Johnny Oldenburger
In my continuous search for modern plugins for my XPages applications I came across Bringins. Bringins is a jQuery plugin to show contents on a webpage as an animated page. These page will be positioned 'fixed' with scrollable data. You can have your custom CSS content to appear in the bringins pages. This plugin allows you to choose from three intoduction animations for the page whether to animate the page on the left, right or center of the webpage. The plugin also provides options to specif
147
IBM Notes 9.0.1 Feature Pack 9 Interim Fix 1 Available for download on IBM Fix Central
Sat, Oct 14th 2017 6:08p   Johnny Oldenburger
On October 10th IBM released IBM Notes Feature Pack 9 Interim Fix 1 on IBM Fix Central. Below an overview of the Fixes in this release. Download link: IBM Notes Client 9.0.1 FP9 Interim Fix 1 More information: IBM Fix Central See also my blog post IBM Domino 9.0.1 Feature Pack 9 Interim Fix 2 Available on IBM Fix Central.
178
Create Animated Progress Circles in XPage using Circliful
Fri, Oct 13th 2017 2:55p   Johnny Oldenburger
For a new XPages application one of the requirements was to present some specific project data in progress circles. In my search I came across Circliful. Circliful is a very easy to use jquery plugin for creating beautiful, responsive and highly customizable animated progress circles. Circliful show data as circle statistics, no images used and is based on SVG and jquery including many options which can be set. For the most simple use you only have to add an element on your XPage with a unique i
231
IBM Domino 9.0.1 Feature Pack 9 Interim Fix 2 Available on IBM Fix Central
Fri, Oct 13th 2017 11:04a   Johnny Oldenburger
Yesterday IBM released IBM Domino Feature Pack 9 Interim Fix 2 on IBM Fix Central. Below an overview of the Fixes in this release. Download link: IBM Domino 9.0.1 FP9 Interim Fix 2 For more information: IBM Fix Central
108
IBM JUMP Session - The Connections Catalog: Integrating 3rd Party Apps For More Business Value
Fri, Oct 13th 2017 6:35a   Johnny Oldenburger
There will be an interesting IBM Jump Session on 2 November, The Connections Catalog: Integrating 3rd Party Apps For More Business Value. JUMP stands for Join, Understand, Master and Participate. Content Topic: The Connections Catalog: Integrating 3rd Party Apps For More Business Value Date: Thursday, November 2, 2017 Time: 11:00 AM EDT (15:00 UTC/GMT, UTC-4 hours) for 60 minutes The new and improved Connections Cloud Catalog is the first step toward building an “app store” in the Pink wor
127
Using Smoke Form Validation And Components for Bootstrap in XPages Part 3 - Easy, Simple and Safer Form Validation
Thu, Oct 12th 2017 12:18p   Johnny Oldenburger
In my prevoius blog posts about Smoke, Using Smoke Form Validation And Components for Bootstrap in XPages Part 1 - Alerts and Using Smoke Form Validation And Components for Bootstrap in XPages Part 2 - Confirmation, I described how you can use the Smoke Components Alert and Conformation in an XPages application. In this blog post the first part of how you can use the Smoke Form Validation in an XPages application. In this blog post the validation of Empty-, Alphanumeric and Number Fields are de
75
It's IBM Champion Season! Nominations are open!
Tue, Oct 10th 2017 5:17a   Johnny Oldenburger
The IBM Champion program recognizes innovative thought leaders in the technical community -- and rewards these contributors by amplifying their voice and increasing their sphere of influence. An IBM Champion is an IT professional, business leader, developer, or educator who influences and mentors others to help them make best use of IBM software, solutions, and services. The IBM Champion program recognizes innovative thought leaders in the technical community. An IBM Champion is an IT professi
4
Upcoming Webinar - Gain Cognitive Insights and Build Scalable Cognitive Solution with the New IBM Watson Explorer
Sat, Sep 30th 2017 2:23p   Johnny Oldenburger
On October 19th, a very interesting webinar will be organized by IBM, Gain Cognitive Insights and Build Scalable Cognitive Solution with the New IBM Watson Explorer. Speakers are Nancy Hensley, Director Watson Explorer, Offering Management IBM and Tanmay Sinha, Offering Management Leader, Watson Explorer IBM. The new Watson Explorer offers completely new cognitive platform that allows you to apply the power of Machine Learning to unlock new patterns, trends, and cognitive insights from across a




Created and Maintained by Yancy Lent - About - Planet Lotus Blog - Advertising - Mobile Edition