Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Copy and paste from Excel to GridView

Reply
Thread Tools

Copy and paste from Excel to GridView

 
 
Luigi
Guest
Posts: n/a
 
      05-21-2010
Hello,
is it possible to copy and paste values taken from an Excel spreedsheet into
the grid of a GridView in a ASP.NET page?

Luigi
 
Reply With Quote
 
 
 
 
Alexey Smirnov
Guest
Posts: n/a
 
      05-21-2010
On May 21, 4:29*pm, Luigi <(E-Mail Removed)> wrote:
> Hello,
> is it possible to copy and paste values taken from an Excel spreedsheet into
> the grid of a GridView in a ASP.NET page?
>
> Luigi


You mean from a single cell or entire table?

The standard gridview control is a data-bound control for rendering
data. It has no paste function. To copy and paste values from Excel
you can use a separated textbox where you can paste the text, parse
it, update datasource with a new data and refresh gridview after that.
The parsing can be easily done, just loop through each line of text
and split it on the tab character.

Hope this helps
 
Reply With Quote
 
 
 
 
Mark Rae [MVP]
Guest
Posts: n/a
 
      05-21-2010
"Alexey Smirnov" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...

> The standard gridview control


What you say is correct, though there are several 3rd-party controls
available which support this behaviour and, although they are not free of
course, they may be more cost-effective for the OP in the long run due to
the "not re-inventing the wheel" factor...


--
Mark Rae
ASP.NET MVP
http://www.markrae.net

 
Reply With Quote
 
Alexey Smirnov
Guest
Posts: n/a
 
      05-21-2010
On May 21, 6:19*pm, "Mark Rae [MVP]" <(E-Mail Removed)> wrote:
> "Alexey Smirnov" <(E-Mail Removed)> wrote in message
>
> news:(E-Mail Removed)...
>
> > The standard gridview control

>
> What you say is correct, though there are several 3rd-party controls
> available which support this behaviour and, although they are not free of
> course, they may be more cost-effective for the OP in the long run due to
> the "not re-inventing the wheel" factor...
>
> --
> Mark Rae
> ASP.NET MVPhttp://www.markrae.net


Yes, I agree why reinvent the wheel if it is already exist... On
another hand, such thing can be easily implemented and might be useful
in a variety of contexts

Cheers!
 
Reply With Quote
 
MK
Guest
Posts: n/a
 
      05-27-2010
Do you know what third party controls offer this ability?

*** Sent via Developersdex http://www.developersdex.com ***
 
Reply With Quote
 
Registered User
Guest
Posts: n/a
 
      05-27-2010
On Fri, 21 May 2010 07:29:01 -0700, Luigi
<(E-Mail Removed)> wrote:

>Hello,
>is it possible to copy and paste values taken from an Excel spreedsheet into
>the grid of a GridView in a ASP.NET page?
>

As others have said there are third-party controls that support such
copy-and-paste activity. I have no experience with such controls.

There is probably more going on than the question exposes. I would
consider uploading the file and then bind the data to the control.

regards
A.G.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
XMLSpy: copy data from EXCEL,paste XMLSPY 2004 KaR XML 0 11-24-2008 02:58 PM
Copy Functionality w/o Using Copy/Paste Buffer al_johnson222@yahoo.com Javascript 1 12-01-2006 08:47 PM
Unable to type in google search box, right click and copy and paste Rob W Computer Support 5 06-19-2006 10:23 PM
Python-Excel: How to paste selected cells (range) to different location on the same sheet in Excel zxo102 Python 3 08-09-2005 02:41 PM
copy and paste form RTF document into field in asp form cause it to bypass field length and javascript validation - how to overcome? NotGiven ASP General 3 05-13-2004 12:15 AM



Advertisments