/dev/null [tony lombardo]

Anything and everything ASP.NET and more. Expect to see tips and tricks, opinions on new technology, and fun code samples, along with the occasional rant.
Excel Copy and Paste with NetAdvantage for ASP.NET

Working with a web based grid doesn't have to be boring.  Our goal since day one has been to make Web based controls just as functional as their Windows Forms counterparts.  This isn't an easy task as I'm sure you know, but luckly our developers are always up for a challenge.  Our latest addition is copy and paste functionality between Excel and WebGrid (or between WebGrid and Excel, or between multiple WebGrids).  All of your standard copy/paste scenarios are supported.  Copy one cell and paste it into 100 others,  fill an entire column with a single mouse click... etc.  Your customers are sure to be pleased with these time saving features - and you wont have to write a single line of code!! 

Excel Copy and Paste with Infragistics WebGrid

The shot above comes straight out of the samples browser included with NetAdvantage 2007 Volume 1.  It was created using the WebTab, WebGrid, WebMenu and WebGridExcelExporter.  

There are a few of code snippets included in this sample that should absolutely make your day.   

  1. Showing a context menu (right-click) in both IE and Firefox
  2. Working around clipboard security limitations with Firefox (using an alternate input method)
  3. Creating an Excel file with multiple worksheets using WebGridExcelExporter

Here's the sample if you really can't wait - Excel Copy and Paste

Note: The sample was built using the latest webgrid internal build.  Some of the api's may not be present in the beta code, but should be present in the RC.  Also, if you just want to know how to export multiple worksheets to excel or create a cross-browser context-menu, you can ignore the extra grid bits..  The code should be pretty self explanatory, but any questions can certianly be posted here.

Posted: 20 Feb 2007, 16:56
Filed under:

Comments

J. Ambrose Little said:

Today marks the latest release of our comprehensive .NET suite, NetAdvantage for .NET . There's a ton

# March 6, 2007 6:18 PM

Vimukta Talwar said:

How shall I test this sample? This does not have a project associated.

What do I need to do to make the sample run.

Thanks.

Vimukta

# June 29, 2007 4:25 PM

Tony Lombardo said:

From Visual Studio 2005, use the File -> Open Web Site menu item, and point to the folder.

Alternatively, you can download the latest NetAdvantage for ASP.NET installer, which will install this sample as part of the samples.

Lastly, you can check it out online at http://samples.infragistics.com

# July 3, 2007 1:16 PM

Kedar said:

Is there any limit on number of columns , rows?

# October 18, 2007 12:14 PM

Tony Lombardo said:

There's no limit on rows and columns in the grid, and I'm unaware of a limit on the number of rows and columns that can be copied.  The Exporter does have a limit on the number of rows that can be exported, which I believe is the max value for an int16.  If you need to export more than 30k rows, you can use the export engine to generate new worksheets after the max row count is reached.

# October 18, 2007 12:56 PM

Joe said:

does any one know how to open multiple tabs from excel to firefox at a time?

please mail me @

joe14troy@gmail.com

Thnks in adv..

# November 20, 2007 1:39 AM
Leave a Comment

(required) 

(required) 

(optional)

(required) 

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS