Ask a questionAsk a question
 

QuestionExport Results from Advanced Search?

  • Monday, November 02, 2009 9:27 PMThisisharper Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Is there a way to export results of your SharePoint search for future reference. I'm interested in native, custom code or 3rd party solutions. Any experience or information that can you can share would be much appreciated.

    Thanks in advance!

All Replies

  • Tuesday, November 03, 2009 5:34 AMitoleck Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Has Code

    Hi Thisisharper,
    Here is one way you could save the results and open them in Excel for future reference. You will need to have edit permissions to the search center page.

    1. Navigate to and edit the search center page.
    2. Add a second Search Core Results web part to the page.
    3. Click Edit->Modify Shared web part for the added Search Core Results web part.
    4. Click XSL Editor...
    5. Select all of the text in the popup window and delete.
    6. Paste the following XSL in the editor window. This came from the following article; http://msdn.microsoft.com/en-us/library/ms546985.aspx.

    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
    <xsl:template match="/">
    <xsl:copy-of select="*"/>
    </xsl:template>
    </xsl:stylesheet>
    

    7. Click OK.
    8. Publish the page.
    9. Perform a search.
    10. Create a new file with an .XML extension.
    11. Add the following as the first line.

    <?xml version="1.0" encoding="UTF-8"?>
    

    12. Right-click the web page and select view source.
    13. Find and copy all of text from <All_Results> to </All_Results>
    14. Paste the text below the xml version line and save.
    15. You can now open the .xml results file in Excel 2007 to view the results in table format.

    Notice that their could be issues opening the file if there are Unicode characters in the results as XML is UTF8 only.

    I realize that these are some pretty long steps, but after steps 1-8 are done you will not have to do them again. Also this way you do not need any additional software. There may be other solutions.


    Chad Schultz -MSFT This posting is provided "AS IS" with no warranties, and confers no rights.
  • Tuesday, November 03, 2009 9:53 PMThisisharper Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    This helps, but the users that need to save the results would be non-technical.  If there was a button to save the XML without other intervention that would be ideal. Seaches and results would need to be saved and archived regularly during the year.

    Anyone else out there with a more polished solution?

    Thanks!