Skip to main content
 
developerWorks
AIX and UNIX
Information Mgmt
Lotus
New to Lotus
Products
How to buy
Downloads
Live demos
Technical library
Training
Support
Forums & community
Events
Rational
Tivoli
WebSphere
Java™ technology
Linux
Open source
SOA and Web services
Web development
XML
My developerWorks
About dW
Submit content
Feedback



developerWorks  >  Lotus  >  Forums & community  >  Notes/Domino 4 and 5 Forum

Notes/Domino 4 and 5 Forum

developerWorks

  

Sign in to participate PreviousPrevious NextNext

Export to Excel creating duplicate files
Beck Johnson 25.Oct.04 02:09 PM a Web browser
Domino Designer -- LotusScript 4.5.7 Windows XP

When I export to Excel, it saves my file in the folder I've designated - no problem. However, it also creates a duplicate file - Book1 - which doesn't get saved but just hangs in the background. I don't see it until I attempt to shut down ,at which time I have to answer "No" to saving it in order to finish shutting down. I looked for a problem statement like this in the forum and didn't see anything similar, so my apologies in advance if I'm asking something that's been answered before.

Here's the code I'm using:

Sub Click(Source As Button)
Dim ses As New NotesSession
Dim db As NotesDatabase
Dim View As NotesView
Dim doc As NotesDocument
Dim xl As Variant
Dim ka As String
Set db = ses.currentdatabase
Set view = db.getview("User Assets")
Set doc = view.getfirstdocument
Set xl = createobject("Excel.Application")


xl.workbooks.Add
x = 2 'puts first data line in row 2
Do Until Doc Is Nothing


xl.Range("A"&x).value = doc.StaffMemberDisp
xl.Range("B"&x).value = doc.ItemDisp
xl.Range("C"&x).value = doc.SerialNbrDisp

x = x + 1
Set doc = view.getnextdocument(doc)
Loop
xl.Range("A1").Font.Size = 12
xl.Range("A1").Font.Bold = True
xl.Range("A1").ColumnWidth = 24
xl.Range("A1").value = "Owner"
xl.Range("B1").Font.Size = 12
xl.Range("B1").Font.Bold = True
xl.Range("B1").ColumnWidth = 37
xl.Range("B1").value = "Item"
xl.Range("C1").Font.Size = 12
xl.Range("C1").Font.Bold = True
xl.Range("C1").ColumnWidth = 8
xl.Range("C1").value = "Serial Number"


xl.Columns("A:A").EntireColumn.AutoFit
xl.Columns("B:B").EntireColumn.AutoFit
xl.Columns("C:C").EntireColumn.AutoFit

xl.ActiveWorkbook.SaveCopyAs("C:\Asset Reports\User Report.xls")
xl.visible = False
Msgbox "The Excel file has been saved to your Asset Reports folder as 'User Report'.", 64, "Excel Report"

End Sub




Export to Excel creating duplicate ... (Beck Johnson 25.Oct.04)
. . RE: Export to Excel creating duplic... (Wing Mar 25.Oct.04)






  Document options
Print this pagePrint this page

 Search this forum

  Forum views and search
Date (threaded)
Date (flat)
With excerpt
Author
Category
Platform
Release
Advanced search

 Sign In or Register
Sign in
Forgot your password?
Forgot your user name?
Create new registration

 RSS feedsRSS
All forum posts RSS
All main topics RSS
More Lotus RSS feeds

 Resources
Forum use and etiquette
Native Notes Access
Web site Feedback

  Lotus Support
Lotus Support
Product support pages index
Search knowledge base (Technotes)
Search support downloads
Lotus Support RSS

 Wikis
IBM Composite Applications
IBM Mashup Center
IBM Connections
IBM Docs
IBM Forms
IBM Mobile Connect
IBM Sametime
IBM SmartCloud for Social Business
IBM Web Experience Factory
Lotus Domino
Lotus Domino Designer
Lotus Expeditor
Lotus Foundations
Lotus iNotes
Lotus Instructor Community Courseware
Lotus Notes
Lotus Notes & Domino Application Development
Lotus Notes Traveler
Lotus Protector
Lotus Quickr
Lotus Symphony
IBM Web Content Manager
WebSphere Portal

 Lotus Forums
Notes/Domino 9.0
Notes/Domino 8.5 + Traveler
Notes/Domino XPages development forum
Notes/Domino 8
Notes/Domino 6 and 7
Notes/Domino 4 and 5
IBM Connections
IBM Forms
IBM Mobile Connect
IBM Sametime
IBM SmartCloud Notes
IBM SmartCloud Meetings
IBM Web Content Manager
Lotus Domino Document Manager
Lotus e-learning
Lotus Enterprise Integration
Lotus Expeditor
Lotus Protector
Lotus Quickr
Lotus SmartSuite
Lotus Symphony
Lotus Symphony Developer Toolkit Support
Lotus Workflow