function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
sfunstonsfunston 

export scontrol report

I am trying to determine a method to export a "report" that was created using an scontrol to excel. 

So this control is not accessible from the reports tab.  As it is an scontrol.  The reason that the report was not created using salesforce.com "Reports" is because "Reports" is not flexible enough.

Thanks for any help.

-Steven
CoderFromHomeCoderFromHome
Hi, did you recieve any replies, I am facing the same problem :smileysad:
sfunstonsfunston
Nope, never got any replies.

The best solution that I came up with, not a good one, was to have an export button that fills a hidden element with the grid html and then posts the page to a web server that I have control over.  The page that is reqeusted is a very simple asp page that graps the hidden element data from the request object and then simply writes it out to the page.  The page content type is Response.ContentType = "application/vnd.ms-excel" so the page invokes excel and there you have it.
This is slow.  You also have to consider what version of iis you are using (if are using IIS).  Version 6 only has a setting in its config file that limits the size of a file upload.  Previous versions have other gotchas.  One version requires that you take the data in the hidden element and tear in down to managable peices that post.

Let me know if you need any further information regarding the web server.
CoderFromHomeCoderFromHome
Thank you for your reply. I have found another solution, export to Excel using Javascript. Of course this displays a warning to the users, but I guess it will work for now. BTW, can you export list views to Excel? I am thinking of this as an alternative solution.
sfunstonsfunston
Have you already implemented your solution.  I looked at that as an option, but it seemed like a lot of development and I was also concerned about the load on the client browser.

I am curious as to how it worked out for you.