473,722 Members | 2,338 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Copy / Paste, Excel To flexgrid

Hi everyone,

i am ttrying to find a way to do the copy / paste between an existing
excel file and my flexgrid (in runtime application). But the fact is
that i don't know how to proceed.

The thing that i am trying to do is to code this : A man can do ctrl+c
in an excel application and do ctrl+v in his flexgrid (in runtime mode)

Regards,

----

C.Marcelino

Jul 17 '06 #1
7 6582
Are you trying programmaticall y?
"VoTiger" <ch************ ******@gmail.co mwrote in message
news:11******** *************@s 13g2000cwa.goog legroups.com...
Hi everyone,

i am ttrying to find a way to do the copy / paste between an existing
excel file and my flexgrid (in runtime application). But the fact is
that i don't know how to proceed.

The thing that i am trying to do is to code this : A man can do ctrl+c
in an excel application and do ctrl+v in his flexgrid (in runtime mode)

Regards,

----

C.Marcelino

Jul 17 '06 #2
Yes, in VB.NET.

Regards,

----

C.Marcelino

Jul 17 '06 #3
I don't know of such a simple method but you may access the data of the
Excel sheet via the Object Model of Excel and then populate the data into
the GridControl

You have to consider the following
How will the program know the path of the file
How to use the object model, if you haven't used it before it is not so easy

Another method if the file can be .csv then you can read it and parse it
yourself that should be quite easy

hth,
Samuel Shulman
"VoTiger" <ch************ ******@gmail.co mwrote in message
news:11******** **************@ m73g2000cwd.goo glegroups.com.. .
Yes, in VB.NET.

Regards,

----

C.Marcelino

Jul 17 '06 #4
Hello Samuel,

If you want the user to press Ctrl+C to copy, Ctrl+V to paste:

Use KeyData of the KeyUp event to sense Ctrl + V press by the user.

Checkout how the results can be copied from the clipboard into your
application.
http://msdn2.microsoft.com/en-us/lib...clipboard.aspx

Finally, use a table to write into flexgrid.

Hope it helps.

Jul 17 '06 #5
Thank you IdleBrain and Samuel for your both help. As IdleBrain said i
am using the Clipboard control and it is working perfectly using the
method GetDataObject.G etdata(). But the thing that disturb me is that i
am getting just the text and i would like to have the object that
contains the type of the value and the text. If someone has any idea to
make this i would truely appreciate.

Regards,

----

C.Marcelino

Jul 18 '06 #6
Hai:
Have you tried using IDataObject.Get Data (Type) as mentioned in:
http://msdn2.microsoft.com/en-us/lib...t.getdata.aspx

Also check out IDataObject.Get Formats () as mentioned in:
http://msdn2.microsoft.com/en-us/lib...etformats.aspx
Hope it helps.

Jul 18 '06 #7
Thank you for your reply idlebrain.

I will try to see that, and will tell if it works.

Regards,

----

C.Marcelino

Jul 18 '06 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
9555
by: cv | last post by:
Hi all, I have to copy two set of data from 2 files(notepad/excel) say, products and their corresponding prices to list/textarea/table. I should be able to retrieve the product and corresponding price information from the control(list/textarea/table). Which is the best way? Quite urgent.. pls let me know. TIA, cv
3
32947
by: Faith | last post by:
Hello. I need to take a column from Excel(unknown amount of rows) that will be selected by the user and copy those cells. Then I will need to paste those cells into the first column in a Data Grid (system.windows.forms). Basically, the user receives a list of clientIDs from a client as an email attachment in Excel listed like: 1234 ABC Company 234 DEF Company 348 GHI Company
0
2126
by: TC | last post by:
Hello, Here is what I'm trying to do: -- Make sure both MS Excel and MS Word are running -- Create an Excel chart -- Save the Excel file -- Copy the Excel chart onto the clipboard using Ctrl + C -- Go to Word and look under Edit > Paste Special -- Note there is a source reference and an option to paste the chart as a
5
4071
by: TC | last post by:
Hello, Here is what I'm trying to do: -- Make sure both MS Excel and MS Word are running -- Create an Excel chart -- Save the Excel file -- Copy the Excel chart onto the clipboard using Ctrl + C -- Go to Word and look under Edit > Paste Special -- Note there is a source reference and an option to paste the chart as a
2
35222
by: Mansi | last post by:
I'm trying to automate excel from c#. One of the things I need to do is to copy/paste/insert rows in excel via c# code. I tried to do the following: 1) Select a row in excel (a12 to k12) 2) Insert a row. 3) copy contents of a12 to k12. 4) Paste these contents to new row. The "Record Macro" function returns the following code:
7
11627
by: lgbjr | last post by:
Hello All, I¡¯m using a context menu associated with some pictureboxes to provide copy/paste functionality. Copying the image to the clipboard was easy. But pasting an image from the clipboard is proving to be more difficult. These pictureboxes are bound to an AccessDB. If the user wants to add an image, they select an image using an OpenFileDialog: Dim result As DialogResult = Pic_Sel.ShowDialog() If (result = DialogResult.OK) Then
0
1515
by: six888 | last post by:
i need to make a report using excel. im given a few data in excel document for a 1 month report (1 document for each week). each data document have a few work sheet.i need only certain information in each week data. before this i do it manually by copy-paste each information i want to a new excel where i compile all the data for the month.i want to do some automation process.the problem is i dont have any idea on how to do that. can you all help...
0
1577
by: arindams | last post by:
I've a form where an webrowser contains a html file. I want to copy a selective portion of the html content and paste that content in an excel 2007 file where it will be pasted as a normal text (not in HTML code). I want to have the excel part should be as it is done manually (i.e. it should be in proper format as it is in the HTML file). Platform/OS/Version : GUI/Windows XP/2005 Language :Vb.Net Private Sub frmParse_Load(ByVal sender...
2
7624
by: deve8ore | last post by:
Hello, I'm working with Adobe Reader 8.0, working on a project for work, so not allowed to download any other software/ freeware. We receive PDF files frequently with about 20 sheets. I'd like to copy these 20 sheets at one time and just paste them into an Excel spreadsheet (one sheet). Nothing fancy, no elaborate formatting, I would just like the picture of the PDF sheets in Excel. I can manually copy one sheet and paste onto the...
0
8739
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9384
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9157
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9088
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8052
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4502
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4762
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3207
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2147
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.