SharePoint Developer Center > SharePoint Products and Technologies Forums > SharePoint - Design and Customization > Exporting to Microsoft Excel from a DataView Web Part consuming a Web Service with Parameters
Ask a questionAsk a question
 

QuestionExporting to Microsoft Excel from a DataView Web Part consuming a Web Service with Parameters

  • Wednesday, January 16, 2008 7:20 PMMark Christie Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    In Sharepoint Designer, I've developed a page displaying a DataView Web Part which consumes an XML Web Service with three parameters.  These parameters are passed in from a simple Form Web Part containing three input fields.  I am able to provide default values for the web service so the dataview is initially populated, and when I enter in new parameters, the web service goes back, grabs the requested data and displays in the dataview nice and slick.

    The problem I'm having is this: In Internet Explorer 7, when I right-click on the DataView Web Part and select Export to Microsoft Excel, Excel opens up, says "ExternalData_1: Getting Data..." and returns the data from the web service which applies to the default parameter values each and every time, regardless of whether I have changed the parameters on the web page, and contrary to what the DataView Web Part displays on the screen.

    Has anyone else run into this, and is there a solution to the problem?

    Best regards,
    Mark Christie

All Replies

  • Thursday, January 17, 2008 7:35 PMBen McMann Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Mark,

     

    I have never tried this, but in theory it is supposed to work.

     

    When you create your Dataview Webpart in SharePoint Designer, when you click on on the on object UI for the dataview webpart and select Dataview Properties, under the General tab you will have an option to enable the SharePoint List toolbar.  This will then give you the option to export to Excel from the Actions menu from within the dataview webpart itself.

     

    I would try this and see if it works.

     

    -- Ben

  • Thursday, January 17, 2008 9:33 PMMark Christie Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    That did not help, I'm afraid.  And now I can't turn the toolbar off.

    I already have Export to Microsoft Excel available from the dataview webpart.  The problem is, when I click on Export to Microsoft Excel, it's not pulling in the data displayed on the screen.  It's pulling in the data based on the default parameters, not the parameters given in the simple form webpart.

    Regards,
    Mark

  • Wednesday, May 21, 2008 2:10 PMPTP1 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Did you find a solution for this problem?  I have the same issue with a DataView WebPart that consumes a SQL datasource and I'm finding that the exported data always applies to the default parameters, not the actual data on the screen at the time of export.

     

    Also - the "SharePoint list toolbar" DataView property only seems to be available for DataViews that have SharePoints lists/libraries as their data source - so that's of no help to you or me apparently.

     

    Thanks,

    Pam

     

  • Wednesday, October 01, 2008 3:23 PMDan_Cooney Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
     I converted a list to a dataview, and now exporting to spreadsheet does not work. The spreadsheet I get only has 'file type' and 'path' columns. Seems to be a bug, which is a big problem for me now because I have designed a whole system around things working this way.  Any workarounds?
  • Friday, July 24, 2009 2:58 PMBijNep Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Did you find a solution for this problem?  converted a list to a dataview, now I want to export to the Excel file or CSV file but not having Luck. Can anybody help me out with this problem?



    thank you
    Bij
  • Friday, July 24, 2009 3:04 PMBijNep Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     


    Basically I have many list (based on the department) with same columns to consolidate I use the dataview webpart. Now I have problem with Exporting Dataview into Excel or CSV file.

    Did anybody find a solution for this problem?   Help me out with this problem.

    Thank you
    Bij

  • Wednesday, November 04, 2009 8:10 PMSai Krishna Rachakonda Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    I also faced this problem but no solution found for this yet. I know the reason for this failure.

    Export to Spreadsheet action being on by taking ListID and ViewID values. But, from the DataView/DataForm webparts, "Export to Spreadsheet" is passing the list id but failing to pass viewid and passing id with ZEROS. You can see this information when you open owssvr.iqy file in notepage.

  • Thursday, November 19, 2009 9:23 PMcynthiaharrison Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hi everyone,

    I had the same problem with my SharePoint data view and discovered that if your cursor is in the "Totals" footer at the bottom of the view when you right-click and choose "Export to Excel"... it works.  Go figure.