|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Copy / Paste, Excel To flexgridHi 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 Are you trying programmatically?
Show quoteHide quote "VoTiger" <christophe.marcel***@gmail.com> wrote in message news:1153144108.460971.43720@s13g2000cwa.googlegroups.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 > 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 Show quoteHide quote "VoTiger" <christophe.marcel***@gmail.com> wrote in message news:1153148929.362348.203370@m73g2000cwd.googlegroups.com... > Yes, in VB.NET. > > Regards, > > ---- > > C.Marcelino > 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/library/system.windows.forms.clipboard.aspx Finally, use a table to write into flexgrid. Hope it helps. 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.Getdata(). 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 Hai:
Have you tried using IDataObject.GetData (Type) as mentioned in: http://msdn2.microsoft.com/en-us/library/system.windows.forms.idataobject.getdata.aspx Also check out IDataObject.GetFormats () as mentioned in: http://msdn2.microsoft.com/en-us/library/system.windows.forms.idataobject.getformats.aspx Hope it helps. Thank you for your reply idlebrain.
I will try to see that, and will tell if it works. Regards, ---- C.Marcelino
Bug or Feature? CancelButton vs Escape Key
ListView and ImageList/ImageKey Public Structure An unhandled exception of type 'System.Data.SqlClient.SqlException' occurred in system.data.dll Sendmessage problem help! Holding down a key HELP: Problem Hosting the "Simplest" of VB.NET Apps detect if running on a terminal server Deleting files using wildcards text editor |
|||||||||||||||||||||||