Home > Ask the Domino Experts > Web Development and Downloads Questions & Answers > Export a search result view from Excel
Ask The Domino Expert: Questions & Answers
EMAIL THIS

Export a search result view from Excel

Jens Bruntt EXPERT RESPONSE FROM: Jens Bruntt

Pose a Question
Other Domino Categories
Meet all Domino Experts
Become an Expert for this site


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


>
QUESTION POSED ON: 24 November 2004
How can I export a search result view from Excel (on the Web and with a LotusScript agent)?

>
Have a look at the method described at codestore.net, Keeping the boss happy. Basically you need an agent to write back the results to the Web user in a way that makes your browser recognize that it is an Excel file.
Print |Content-Type:
application/vnd.ms-excel|
Print |<table border="1">
<tr><td width="80">Document titles
</td><td>document authors</td>
</tr>
<tr><td>title number one</td>
<td>author number one</td></tr>
<tr><td>title number two</td>
<td>author number two</td></tr>
</table>|

If you access an agent containing this code (from a browser using http://server/database.nsf/searchagentname?openagent), it will open up Excel displaying three rows and two columns.

So, what you need to do is have a Web-enabled form with a query field and a submit button. Put an agent name in the webquerysave event of the form. Let the agent access session.DocumentContext, and from there access the field containing the query. Do an ftsearch and then loop through the resulting documents, printing a new line containing something like this for each document:

Print |<tr><td>| & loopducment.
subject(0) & 
|</td><td>| & loopdocument.
authors(0) & |</td></tr>|

Do you have comments on this Ask the Expert question and response? Let us know.


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED CONTENT
Web Development and Downloads
Programmatically copy and hide attachments in Lotus Notes rich-text fields
Programmatically edit a rich-text field table from within the Lotus Notes client
Troubleshooting Lotus Notes Domino tabbed table problems
Verify Lotus Notes user access to Web pages
Can LotusScript agent display search results using specific view?
Creating Word doc from form works in Notes 5.0.2 but not 5.0.11
XML vs. JavaScript to fill in dropdown on form
Debugging Web agents
Configure an IM hot spot on Web page
Can I use PHP to change tables in MySQL DB running off Domino?

LotusScript
LotusScript agent parses ACL to Microsoft Notepad
LotusScript finds the first occurrence of a string from the right
Clear Recent Contacts view and prevent repopulation in Lotus Notes 8.x
Search Microsoft Active Directory with LotusScript
Three steps to trap and handle save conflicts with LotusScript
Troubleshoot agents by displaying LotusScript variables online
LotusScript sorts lists alphabetically
Run or restart Notes/Domino agents via text messages
LotusScript code rebuilds corrupted busytime.nsf file
Soft-code item names to facilitate LotusScript management

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary



Search and Browse the Expert Answer Center
Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
Browse our Expert Advice



Lotus Notes Domino on Blackberry and mobile devices
HomeTopicsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersDomino IT Downloads
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 1999 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts