button click Export to Excel = Right Click Export to Excel - Please Help!

I have code which exports to Excel.  However, I would like to remove these pages and just call the event to "Export to Excel" similar to "Print". 

You know how you can just add a Print button and the page is printed?  In IE 7.0 you can right click on the page and "Export to Excel", I would like to invoke that command and export the page to Excel exactly the way it looks in the browser. 

Does anyone know how to do this?

Yes, we are all using IE 7.0 and it is an internal application.

 


"From my point of view, the Jedi are evil!"
0
commadercody
6/6/2007 10:26:20 PM
asp.net.client-side 24353 articles. 1 followers. Follow

8 Replies
964 Views

Similar Articles

[PageSpeed] 28

 So are you looking for a context menu that has the "Export to Excel" option when you right click?

Try eLouai's Javascript DHTML Popup Menu - http://elouai.com/javascript/javascript-popup-menu.php

It works by disabling the default contextmenu and this is replaced with a div which can be hidden or made visible whenever the right mouse button (the context menu) is selected.


M.V. 'Anil' Radhakrishna
Web Development Tips, Tricks & Trivia | My Code Gallery

Recent article - How To Create a Custom IE8 Accelerator

0
mvark
6/11/2007 9:35:02 AM

IE7 doesnt have an API or anything for invoking this command.  Why dont you just train your users to be smart enough to right click and choose it themselves!!


Josh Stodola ← Come check out my blog!
0
JoshStodola
6/11/2007 5:00:17 PM

JoshStodola:

IE7 doesnt have an API or anything for invoking this command.  Why dont you just train your users to be smart enough to right click and choose it themselves!!

Josh, that is the funniest thing I have heard all week.  Thanks for the laugh, but as we know they cannot be trained.  Sure 8/10 will get it, but those 2 remaining will bicker and complain.  The sad thing is, it only takes one who has the ear of someone important and the button has to be made.


"From my point of view, the Jedi are evil!"
0
commadercody
6/11/2007 6:10:35 PM

Good luck with that philosophy!  Something this petty (that will likely only get used by you) is not going to be considered by IE developers.  Why would they alienate themselves even more by implementing YET ANOTHER non-standardized javascript function?!  They already went the extra mile by providing the option when you right-click, if that is not good enough for you (or your obviously handicapped users) then write your own export function!!  Which, from what I understand, you have already done.

You're welcome for the laugh, but it is funnier to hear that people are actually going to bicker and complain about using more than one of the buttons on the mouse!  And don't get me wrong, I work with and develop for numerous "unexperienced" end-users who dont know a darn thing about computers.  I totally know how tough this can be, but right clicking the mouse and choosing one painfully obvious option is as BASIC AS IT GETS!  If they can't figure that out, then it is definitely time to retire.

Best regards...


Josh Stodola ← Come check out my blog!
0
JoshStodola
6/11/2007 8:01:18 PM

I will fight the good fight, but this is a battle I cannot win. ;(


"From my point of view, the Jedi are evil!"
0
commadercody
6/26/2007 3:53:15 PM

I am looking for something like this but free, how can .NET not have a free control which will export to Excel on the client side.  They are both Microsoft after all.  I am wanting to export a asp:TABLE to Excel not a GridView or anything like that. 

http://www.linecraft.com/save2_word/help.php

If they can do it, why hasn't Microsoft given us a client call to export the current page to Excel?


"From my point of view, the Jedi are evil!"
0
commadercody
7/3/2007 3:25:04 PM

Maybe because ASP.NET is basically server-side code? What gives you the idea that everything has to be free? Do you work for free?

NC...

 

0
NC01
7/3/2007 3:40:46 PM

I do work for free!

But this thread had the answer

http://forums.asp.net/p/1086952/1620289.aspx#1620289

Big Smile


"From my point of view, the Jedi are evil!"
0
commadercody
7/3/2007 3:47:47 PM
Reply:

Similar Artilces:

button Export to Excel = Right Click "Export to Microsoft Excel"
Ok, I know how to export data to Excel, what I would like is similar to the print button.  You know how you can just add a Print button and the page is printed?  In IE 7.0 you can right click on the page and "Export to Excel", I would like to invoke that command and export the page to Excel exactly the way it looks in the browser.  Does anyone know how to do this? Yes, we are all using IE 7.0 and it is an internal app."From my point of view, the Jedi are evil!" Nobody knows how to do this?"From my point of view, the Jedi are evil!" IT's b...

Exporting to Excel in Crystal Reports .NET
sir,   I want to export Crystal report to Excel and the following is the code i wrote in the button click.ReportDocument rptExcel = new ReportDocument() ;string strExportFile = "C:/Session_SessionID.xls" ;rptExcel = new RptJobOrderRecap();//report namerptExcel.ExportOptions.ExportDestinationType = ExportDestinationType.DiskFile ;rptExcel.ExportOptions.ExportFormatType = ExportFormatType.Excel;ExcelFormatOptions objExcelOptions = new ExcelFormatOptions();objExcelOptions.ExcelUseConstantColumnWidth = false ;rptExcel.ExportOptions.FormatOptions = objExcelOptions ;DiskFileDestinationOp...

Right Click -> Export to Excel
This is my first post, so bare with me. (ASP.NET 2.0, Default.aspx, defaultlanguage=VB)I have code that generates a series of responses and places them in an ArrayList, based on different selections of a drop down box.My page looks like this<% my codeLook at some files, compare it to the dropdownlist selection and add results to ArrayList.Example: ArrayList.Add("<tr><td>" & ResultA & "</td><td>" & ResultB & "</td></tr>") %><DropDownList with PostBack=True><html table><tr><td>First Name</td><td>...

Export Datagrid to excel On Button click
Hi all I have found the below code that will let me export my datagrid to excel. But how do I use this code in Visual web developer in order for it to run. I have tried adding this code to the clientonclick event of the button properties but nothing happens when I click the button after saving. The properties box of the onclick event is small expecting just a short expression So I assume I am adding the code in the wrong place.  My question is. In VWD where do I place the below code to the button so that it runs when The button is clicked.??   Please help, Ray...

Right Click Export To Microsoft Excel
Hi,I have an asp page that is used for searching that displays the results in a datagrid. When the page loads it runs a default query and displays "open" items or orders/whatever you want to call them. I initially wrote an excel export function but noticed that simply by right clicking on the datagrid and selecting export to microsoft excel solved the problem. The issue is that if I run a query that returns results other than the default one, when I right click and export to excel I get the the default query results in excel even though the page is displaying (and the datagrid has bound) a d...

GridView export to excel using right click option
History: When I display a GridView if I right click on it, I have an option to 'Export to Excel'.  This works fine, except it seems to cache the GridView data, so if I update the GridView in anyway, the original GridView is exported, not the displayed GridView.  Question: Is there someway to ensure that the displayed GridView is exported? Thanks and best regards That function just uses Excel to re-request a page using the URL that is in the browser. Any changes you make are not reflected. I overcame that problem by using URL parameters instead of postback for the pages...

One click Excel/CSV data export button
Many a times people do same thing over and over for exporting data to Excel or CSV format. One click button is the solution. Just drag this ASP.NET control and set its properties and you are all set to export data to any format without writing a single line of code. For article on One Click Export button visit http://www.codeproject.com/aspnet/Excel_CSV_export_button.asp For more info visit http://prashantnayak.freeserver.comMCSD .NET lover...

Easy? right click in Explorer and Export to Excel loses sessions
Hi, I am using a web form that is quering data from a database. When a user is selecting different parameters I am changing some session variables. It works fine. But when a user are selecting something and then right click to export to Excel my code is is like session values are empty? Best Regards Staffan    IE's Export To Excel merely requests the page (it opens excel and passes the URL to be requested); since it's actually Excel doing the request, it will not pass form data or session data. If you want to support it, you need to use URL parameters. ...

DropDownList does not post back after Button to export GridList Data to Excel is clicked
 <%@ Control Language="VB" %> <%@ Import Namespace="System.Data" %> <%@ Import Namespace="Dotnetnuke" %> <%@ Import Namespace="System.Data.sqlclient" %> <%@ Import Namespace="System.Web.UI.WebControls" %> <script runat="server"> Sub page_load(ByVal s As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load BindGrid() End Sub Public Function GetLink(ByVal UserId As Integer) As String Dim strEditUrl As String...

Export To Excel Excel
Do we have any facility to export grid data in Excel with using Report Tool. Just a question, Will Response.contenet Type will work here Thanks, private void btnExportToExcel_Click(object sender,System.EventArgs e) { ExportToExcel("Report.xls",DataGrid1); } private void ExportToExcel(string strFileName,DataGrid dg) { Response.Clear(); Response.Buffer = true; Response.ContentType = "application/vnd.ms-excel"; Response.AddHeader("content-disposition", "attachment;filename=" + strFileName); Response.Charset = ""; this.EnableVi...

Client Side Export To Excel
Hi all and thanks in advance. I'm trying to export a gird to excel and open up in a new window using javascript after the grid has been sorted. Any help would be greatly appreciated. Thank youDon't forget to "Mark as Answer" if this post answered your questionLife's goodMy Site There are plenty of threads on Exporting the GridView to Excel here is one http://forums.asp.net/thread/1733244.aspx Joseph GuadagnoMy Website: http://www.josephguadagno.netMy Blog - http://weblogs.asp.net/jguadagno/ If this has helped Please: Don't forget to click "Ma...

CGI-Ajax-0.701
I build a table, but, when I try to export to MicroSoft Excel I see Excel start, but then I get a "Web query returned no data" popup. Thank you very much, in advance, for any help!! Regards!! ...

left-click + right-click = Next, right-click + left-click = Back
One really addictive feature, and a very natural gesture that Opera supports is the interpretation of a quick left-click + right-click combination to mean "Next". That will either take you to the next page in your history, or to the a page pointed to by a Next link on the page (I think there is a technically better way to put that last bit, but you will understand). Similarly, Opera interprets a quick right-click + left-click to mean Back. This is so natural to me that I find it hard to believe that various IDEs don't support it. I'm always doing it in bot...

Export to excel spreadsheet from datagrid with 1 click
Hi guys,  I currently use the following code to export my datagrid to an excel spreadsheet.          Dim MyFileName As String = "GLJrnlUpload.xls"         Response.Clear()            Response.AddHeader("content-disposition", "attachment;filename=" + MyFileName + "")              Response.Charset = ""         &...

Click...click...click
I was listening today to a photography podcast at: www.photography.ca/blog and the host Marko described the loss of the hard drive which contained a backup of all his images. He said that one morning he tried to boot up, and the drive just went "click... click... click" but never did anything more, and of course wouldn't boot. Is there a reasonable chance that Spinrite could fix that, or does that behavior indicate a physical problem with the drive head or electronics? Peabody wrote: > I was listening today to a photography podcast at: > > www...

Web resources about - button click Export to Excel = Right Click Export to Excel - Please Help! - asp.net.client-side

Button - Wikipedia, the free encyclopedia
In modern clothing and fashion design , a button is a small fastener , now most commonly made of plastic , but also frequently of metal, wood ...

50,000 Websites Add Facebook's Like Button And Social Plugins In First Week
50,000 Websites Add Facebook's Like Button And Social Plugins In First Week

Chrome 48 Beta brings custom buttons on notifications, casting from the web, more
With Chrome 47 currently rolling out to desktops and Android, Google has announced the Chrome 48 Beta and the new features that will come with ...

Facebook Testing ‘Buy Tickets’ Button for Concerts
... to rock out with their, um, devices out. The social network confirmed to BuzzFeed News that it is testing a “Buy Tickets” call-to-action button ...

Carcassonne developer does interactive fiction with One Button Travel for iOS
... the twitch puzzle game Rules . And now, TheCodingMonkeys haveentered yet another new genre, interactive fiction, with the release of One Button ...

Amazon deal: Accept calls with the touch of button with these in-ear headphones
You'll be able to hear both music and phone conversations perfectly with a set of in-ear headphones that have a control talk function with iOS ...

Domino's has launched a physical button you push to order pizza
Domino's is attempting to make the act of ordering pizza even simpler/lazier with the launch of its "The Easy Order" button. The pizza chain ...

The labor ruling that's now a hot-button political issue
NLRB's decision to hold companies accountable for staffing agency violations is enmeshed in the wide-ranging federal spending bill

Hot-Button Issues In The Climate Talks
... so far) have now submitted their nationally determined contributions to reducing emissions and keeping global temperatures [&hellip Hot-Button ...

How to bring back the Google Now Home button shortcut in Android 6.0
One of the marquee features in Android 6.0 is Google Now on Tap , a new system-wide contextual assistant that's wildly impressive some of the ...

Resources last updated: 12/10/2015 2:57:14 PM