?
Solved

lotus notes, attachment and export

Posted on 2003-03-22
7
Medium Priority
?
1,334 Views
Last Modified: 2013-12-18
Hello,
 How do I export a view to a comma delimited file (for example .csv file). Also, The documents in this view have attachments how do I download those files to a directory.

thanks in advance for any help.

0
Comment
Question by:premtemp
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
7 Comments
 
LVL 7

Accepted Solution

by:
scottrma earned 336 total points
ID: 8191613
The easiest way to do that would be to export the view to Lotus 1-2-3 worksheet format. Choose File -> Export and then select 1-2-3 Worksheet as the type in the drop down list, then name the file with a .wk4 extension. You can then use MS Excel to open the file, and from Excel you can choose File -> Save As, and save it in CSV format.

You could also write a LotusScript agent to export the view directly to a CSV file, but you would also have to write a subroutine in your agent to replace any commas that might be found in your view data with some other character of your choosing (since the file is to be COMMA-delimited, that would mean that commas within the actual data itself would screw up the alignment of columns, so they must be replaced with another character - commas would only be allowed to separate data fields themselves).

Hope this helps.

Scott
0
 
LVL 31

Assisted Solution

by:qwaletee
qwaletee earned 332 total points
ID: 8192533
The tabdelimited format might also be useful.

One problem with spreadhseet/text eport of views is that multi-value fields export oddly.  If a row in a view/folder contains no multi-value items, it exports as a single line/row.  If it has, say, a multivalue field with three values, and a bunch of single-value fields, then the row exports as three lines or rows.  The firts line is filled, the seocnd and third lines only contains values in the column for the multivalue field.

I typically write a fairly simple, generic export script that can be used with most any view for this sort of situation.
0
 
LVL 7

Expert Comment

by:scottrma
ID: 8196402
Also, here is a good script to export any view directly to Excel, from which you could then save it as a CSV file:

http://www-10.lotus.com/ldd/sandbox.nsf/ecc552f1ab6e46e4852568a90055c4cd/e8404780fc839de488256aa40072bb9a?OpenDocument

Regards,

Scott
0
 

Assisted Solution

by:ChrisLeeMarshall
ChrisLeeMarshall earned 332 total points
ID: 8203443
here's a script I use to detach ID files from person documents. Should be able to modify this to detach all to a directory :

        Dim Sess As New NotesSession
     Dim db As NotesDatabase    
     Dim doc As NotesDocument
     Dim DataDirectory, shortname As String
     Dim view As NotesView
     Dim object As NotesEmbeddedObject
     
     Set db = sess.CurrentDatabase
        'pick view from database
     Set view = db.GetView("People")    
     
     DataDirectory = Sess.GetEnvironmentString("Directory",True)
     
     Set doc = view.GetFirstDocument  
     
     While Not (doc Is Nothing)
          shortname = doc.Shortname(0)
          Set object = doc.GetAttachment( "UserID" )
         
          If (object Is Nothing) Then
               Print "No ID attached"              
          Else
                                    'Replace independent with a subdirectory of the DATA directory
               Call object.ExtractFile(DataDirectory & "\\independent\\" & shortname & ".id")
               Call object.Remove
               Call doc.Save( True, True )
          End If
          Set doc = view.GetNextDocument( doc )
     Wend
0
 

Expert Comment

by:ChrisLeeMarshall
ID: 8203809
here's a script I use to detach ID files from person documents. Should be able to modify this to detach all to a directory :

        Dim Sess As New NotesSession
     Dim db As NotesDatabase    
     Dim doc As NotesDocument
     Dim DataDirectory, shortname As String
     Dim view As NotesView
     Dim object As NotesEmbeddedObject
     
     Set db = sess.CurrentDatabase
        'pick view from database
     Set view = db.GetView("People")    
     
     DataDirectory = Sess.GetEnvironmentString("Directory",True)
     
     Set doc = view.GetFirstDocument  
     
     While Not (doc Is Nothing)
          shortname = doc.Shortname(0)
          Set object = doc.GetAttachment( "UserID" )
         
          If (object Is Nothing) Then
               Print "No ID attached"              
          Else
                                    'Replace independent with a subdirectory of the DATA directory
               Call object.ExtractFile(DataDirectory & "\\independent\\" & shortname & ".id")
               Call object.Remove
               Call doc.Save( True, True )
          End If
          Set doc = view.GetNextDocument( doc )
     Wend
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
Problem "Can you help me recover my changes?  I double-clicked the attachment, made changes, and then hit Save before closing it.  But when I try to re-open it, my changes are missing!"    Solution This solution opens the Outlook Secure Temp Fold…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses

765 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