PC Review


Reply
Thread Tools Rating: Thread Rating: 1 votes, 1.00 average.

Copy and paste from Excel to GridView

 
 
Luigi
Guest
Posts: n/a
 
      21st May 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
 
      21st May 2010
On May 21, 4:29*pm, Luigi <Lu...@discussions.microsoft.com> 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
 
      21st May 2010
"Alexey Smirnov" <(E-Mail Removed)> wrote in message
news:56ff8a1a-5617-4912-aa43-(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
 
      21st May 2010
On May 21, 6:19*pm, "Mark Rae [MVP]" <m...@markrae.net> wrote:
> "Alexey Smirnov" <alexey.smir...@gmail.com> wrote in message
>
> news:56ff8a1a-5617-4912-aa43-(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
 
      27th May 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
 
      27th May 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
Rate This Thread
Rate This Thread:

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
HELP - Excel 2003 cut, copy, paste and paste special problems Carrie Microsoft Excel Crashes 2 9th Dec 2008 06:36 PM
Copy & Paste Object without using the Excel Copy Paste functions =?Utf-8?B?R2Fueg==?= Microsoft Excel New Users 0 10th Mar 2004 07:06 AM
Copy & Paste Object without using the Excel Copy Paste functions =?Utf-8?B?R2Fueg==?= Microsoft Excel Misc 0 10th Mar 2004 07:06 AM
Re: Copy/Paste in Excel prints highlighted cells and does not paste Debra Dalgleish Microsoft Excel Misc 0 30th Jul 2003 11:59 PM
Re: Copy/Paste in Excel prints highlighted cells and does not paste Dave Peterson Microsoft Excel Misc 0 30th Jul 2003 11:08 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:12 AM.