?
Solved

creating an excel spreadsheet based on the output result of a loop

Posted on 2006-06-13
2
Medium Priority
?
239 Views
Last Modified: 2013-12-18
Hi all,

This may be a strange question.

Is it possible to create an excel spreadsheet then email that spreadsheet to specific users based on results of a script.

For example, if I have the following example, and this is just an example:

Sub Click(Source As Button)
      
   ' === Get the location of the course DBs
      Dim session As New NotesSession
      Dim dbCur As NotesDatabase
      Set dbCur = session.CurrentDatabase
      Dim sPath As String
      spath = Left( dbCur.FilePath, Len(dbCur.FilePath) - Len(dbCur.FileName) )
      
     ' === Access the Parts database
      Dim dbParts As New NotesDatabase( "", spath & "5LS2part.nsf" )
      
      ' === Set the database search criteria
      Dim sSearchCriteria As String
      sSearchCriteria = | Sex = "Ladies" & @Left(PartID;2) = "GS" |
      
      ' === Gather the collection of ladies parts
      Dim collLadiesParts As NotesDocumentCollection
      Set collLadiesParts = dbParts.Search(sSearchCriteria, Nothing , 0 )
      
      ' === Declare the loop variables
      Dim sGolfSets As String
      Dim docPart As notesdocument
      
      ' === Walk the collection and build the text output of golf sets
      Set docPart = collLadiesParts.GetFirstDocument
      Do Until docPart Is Nothing
            sGolfSets = sGolfSets & Format(docPart.PartPrice(0),"currency")      &  " - "  & docPart.PartName(0) &  Chr(13)
            Set docPart = collLadiesParts.GetNextDocument(docPart)
      Loop
      
      ' === Report the ladies golf sets
Messagebox sGolfSets, MB_ICONINFORMATION , "Big Oak Ladies Golf Sets"
      
 
HERE MY QUESTION

Instead of the messagebox, can I create a spreadsheet from based on the output variable(sGolfSets) and can I then append this spreadsheet as a link and send it in an email to a specific user?

Any help will be much appreciated.

      
0
Comment
Question by:varvoura
[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 Comments
 
LVL 63

Expert Comment

by:SysExpert
ID: 16893018
It would be easier to creaate a CSV file that will open in EXCEL.
You could create the excel spreadsheet, but you may have difficulty saving it automatically, before sending it.

I will find you some samples

0
 
LVL 63

Accepted Solution

by:
SysExpert earned 2000 total points
ID: 16893034
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying 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

This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
Sometimes clients can lose connectivity with the Lotus Notes Domino Server, but there's not always an obvious answer as to why it happens.   Read this article to follow one of the first experiences I had with Lotus Notes on a client's machine, my…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses
Course of the Month12 days, 15 hours left to enroll

777 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