Solved

How to export the user lists of mail database to excel format?

Posted on 2006-11-03
11
219 Views
Last Modified: 2013-12-18
There a about 600 mail user databases in the mail\ director of domino v5.0.13, how can i export the information (title) of the database to excel format file?
0
Comment
Question by:jonathanwong
  • 2
  • 2
  • 2
  • +3
11 Comments
 
LVL 2

Expert Comment

by:rrabie
ID: 17865593
Of hand i'm not sure this is possible.

If you have some designing skill you would be able to import it into a db view and then export to excel or print.

otherwise if you just need the filenames and not the title you can add a column to a new view with the mailfile field specified, and this will then be exportable.

Hope this helps
0
 
LVL 19

Expert Comment

by:madheeswar
ID: 17865615
there should be catalogue.ntf

Please check that
0
 
LVL 19

Accepted Solution

by:
madheeswar earned 34 total points
ID: 17865626
0
 
LVL 63

Expert Comment

by:SysExpert
ID: 17866359
As mentioed, I would simply add a private view in the Domino directory ( addresss book ), and use the export to Lotus 123. This can be imported into Excel.

I hope this helps !
0
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 

Author Comment

by:jonathanwong
ID: 17873631
Hi, rrabie

How can do this? Could you please explain furter. Thanks!
0
 
LVL 63

Expert Comment

by:SysExpert
ID: 17906851
Did you try to acsess the database called "catalog" on any Domino Server ?

It has lots of views and info on all databases that can easily be exported.

I hope this helps !
0
 
LVL 18

Expert Comment

by:marilyng
ID: 17922889
The catalog.nsf does contain a list of databases, but traditionally, mail databases are not listed in the catalog.  The mail template defaults to "do not list".  You can check the box on the template and the server will update the mail designs to be listed, and then update the catalog so you can export the view to excel.

Or you can create an agent on a server database that does the collection and mails you the results:)

I have a test database where I ran this scheduled, with full administration permissions, on the server.  It sends you a "comma delimited file" that will open in Excel.   Be sure to add your email address, server name, and the correct path where indicated.  This will collect *.nsf files.


Sub Initialize
      Dim session As New NotesSession
      Dim db As NotesDatabase
      
      Set db = session.CurrentDatabase
   'ENTER YOUR SERVER NAME HERE-------------------------------
      Const str_SERVER = "YOUR SERVER NAME"
  'ENTER THE FULL PATH OF THE MAIL DIRECTORY HERE ---------
      Const str_STARTDIR="E:\Domino\Data\mail\"
  'THIS IS THE FILE THAT WILL BE MAILED TO YOU ---------------
      Const str_FILENAME="databasedir.csv"
      
    'YOUR EMAIL ADDRESS HERE--------------------------------------
      Const str_SENDTO ="YOUR SEND TO ADDRESS"
      
      If db.Server = "" Then
            Print "Sorry, this agent needs to run on a server"
      End If
      
      Dim chkdb As NotesDatabase
      Dim processed As Long, failed As Long
      Dim sendLog As Boolean
      sendLog = False
      Dim msg As String
      Dim tb As String
      tb = Chr(9)
      
      If str_SENDTO <>"" Then
            sendLog = True
      End If
      
      msg= "Starting the Db Collection agent on " + str_STARTDIR
      Print msg
      
      If sendLog Then
            Dim maildoc As New NotesDocument(db)
            With maildoc
                  .SendTo = str_SENDTO
                  .From = session.UserName
                  .Principal = session.UserName
                  .subject = "Database Directory File:  " +  str_FILENAME
            End With
            Dim rtItem As New NotesRichTextItem(maildoc, "Body")
            
            With rtItem
                  .AddNewline 1
                  .appendText  msg
            End With
      End If
      
      Dim fileNum As Integer
      Dim cdr As String
      cdr = Curdir() +  "\" + str_FILENAME      
      fileNum = Freefile
      Open cdr  For Output As  fileNum      
      
      Write #filenum, "Title","Filename","Filepath", "ReplicaID","Server", "TemplateName" ,"FileFormat", "DesignTemplateName"
      Dim tmp As String
      tmp = Curdir()
      On Error Goto DBDirectoryError
            
      Dim fileName As String
      fileName = Dir$(str_STARTDIR + "*.nsf", 0)
      
      Do While fileName <> ""      
            Set chkdb = New NotesDatabase(str_SERVER,str_STARTDIR + fileName)            
            If Not (chkdb Is Nothing) Then                  
                  If Not chkdb.IsOpen Then Call chkdb.Open("","")
                  If Not chkdb.IsOpen Then
                        msg= "Unable to open " + chkdb.Title
                        Print msg
                        If sendLog Then
                              rtitem.addnewLine 1
                              rtitem.appendText  tb + msg
                        End If
                        failed = failed +1
                        Goto Next_Database
                  End If
                  
 'Collect your information here.............
                  With chkdb                        
                        Write #filenum, .title , .filename , .Filepath, .ReplicaID , .Server ,.TemplateName , Cstr(.FileFormat ), .DesignTemplateName
                        processed =       processed +1
                  End With
                  If sendLog Then                        
                        rtItem.addnewLine 1
                        rtItem.appendText  tb + "Collected: " + chkdb.title                        
                  End If
                  Set chkdb = Nothing
            End If
            
Next_Database:
            fileName = Dir$()
            
      Loop
      
      Close #filenum
      msg = "Finished processing " + Cstr(processed) + " databases.  Failed to process: " + Cstr(failed)
      Print msg
      
ExitHere:      
      If sendLog Then
            Dim object As NotesEmbeddedObject
            With rtItem
                  .addnewline 2
                  .appendText msg
                  .addnewLine 2
                  .appendText "Below find CSV tab-delimited Excel File: "  + cdr
                  Set object = rtItem.embedObject( EMBED_ATTACHMENT, "",cdr)
            End With
            maildoc.send False            
      End If
      
      If Not chkdb Is Nothing Then Set chkdb = Nothing
      
      Exit Sub
      
DBDirectoryError:
      On Error Goto 0
      msg = "Error processing databases: " + Error + "-" + Str(Err) + "  Line: " + Str(Erl)
      Print msg
      If sendLog Then
            rtItem.addnewline 2
            rtItem.appendText msg
      End If
      Err=0      
      Resume Next
End Sub
0
 
LVL 5

Assisted Solution

by:sg405222
sg405222 earned 33 total points
ID: 17965927
Another way that I have used is to install a printer in windows as  a generic text printer on FILE:

Then drag the coloum across so that you can see all the TITLE and print to the text printer.  You can then open this in excel delimiting bu a fixed width

Simple but it works
0
 
LVL 18

Assisted Solution

by:marilyng
marilyng earned 33 total points
ID: 17967087
sg405222 - nice workaround..!
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

For users on the Lotus Notes 8 Standard client, this article provides information on checking the Java Heap size and adjusting it to half of your system RAM in attempt to get the Lotus Notes 8.x Standard client to run faster.  I've had to exercise t…
I thought it will be a good idea to make a post as it will help in case someone else faces these issues. I trust this gives an idea how each entry in Notes.ini can mean a lot for the Domino Server to be functioning properly. This article discusses t…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now