copy Excel's range then drag into dataset widget

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

copy Excel's range then drag into dataset widget

loveflying000
Hi
My customer likes to use Excel to do almost everything -_-!
they want to copy copy Excel's range data then drag into dataset widget directly
If column number and format is simple and same
is it posiible?

or just copy the data(ctrl + C) ,then paste in dataset widget

although I know that it's a good way to read a file to import data
It's a just a thought

could anybody give me some clues?
thanks every~~
Reply | Threaded
Open this post in threaded view
|

Re: copy Excel's range then drag into dataset widget

Georg Heeg
There is a pretty easy integration of Excel in VisualWorks using the current
version of COM Connect.

I made a presentation about this topic at the last ESUG in Barcelona and we
are currently preparing an updated version for Smalltalk Solutions in March.

You can find the ESUG presentation in
http://esug.org/data/ESUG2010/03Wednesday/2010-ESUG-Heeg-Excel.pdf 

There has been also a video of the presentation. But I do not know its url.

In case we can be of any help for you or your customer. Please do not
hesitate to contact me directly.

Georg

Georg Heeg eK, Dortmund und Köthen, HR Dortmund A 12812
Wallstraße 22, 06366 Köthen
Tel. +49-3496-214328, Fax +49-3496-214712


-----Ursprüngliche Nachricht-----
Von: [hidden email] [mailto:[hidden email]] Im Auftrag
von loveflying000
Gesendet: Mittwoch, 16. Februar 2011 06:48
An: [hidden email]
Betreff: [vwnc] copy Excel's range then drag into dataset widget


Hi
My customer likes to use Excel to do almost everything -_-!
they want to copy copy Excel's range data then drag into dataset widget
directly If column number and format is simple and same is it posiible?

or just copy the data(ctrl + C) ,then paste in dataset widget

although I know that it's a good way to read a file to import data It's a
just a thought

could anybody give me some clues?
thanks every~~
--
View this message in context:
http://forum.world.st/copy-Excel-s-range-then-drag-into-dataset-widget-tp330
8230p3308230.html
Sent from the VisualWorks mailing list archive at Nabble.com.
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc



_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: copy Excel's range then drag into dataset widget

Paul Baumann
In reply to this post by loveflying000
Here is the meat of code that I wrote to paste values into a dataset:


        pasteValues := Screen default getExternalSelection runsFailing: [:chr | chr isSeparator ].
        dataSetWidget := self displayedAdjusters_widget.
        rows := dataSetWidget model value.
        rows := rows copyFrom: (rows indexOf: self selectedRow value) to: rows size.
        (pasteValues size ~= rows size or: [rows isEmpty]) ifTrue: [
                (MessageBox
                        confirm: ('The clipboard contains ', pasteValues size printString, ' values, but there are ', rows size printString, ' rows (from the selected row) to paste into.\Continue anyway?') withCRs
                        initialAnswer: false) ifFalse: [^false].
        ].
        keepGoing := true.
        1 to: (pasteValues size min: rows size) do: [:i |
                | row |
                row := rows at: i.
                keepGoing ifTrue: [
                        selectedRow value == row ifFalse: [
                                "Disabling widgets would prevent the user from getting into this situation. This is a guard just in case."
                                MessageBox notice: 'A different row was selected while pasting values. Paste was interrupted.'.
                                ^false.
                        ].
                        fieldEditor := dataSetWidget editor widget.
                        fieldEditor editText: (pasteValues at: i).
                        keepGoing := (fieldEditor controller accept) ~~ false.
                        keepGoing ifTrue: [dataSetWidget moveEditVerticallyBy: 1].
                ].
        ].


Paul Baumann



-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of loveflying000
Sent: Wednesday, February 16, 2011 00:48
To: [hidden email]
Subject: [vwnc] copy Excel's range then drag into dataset widget


Hi
My customer likes to use Excel to do almost everything -_-!
they want to copy copy Excel's range data then drag into dataset widget
directly
If column number and format is simple and same
is it posiible?

or just copy the data(ctrl + C) ,then paste in dataset widget

although I know that it's a good way to read a file to import data
It's a just a thought

could anybody give me some clues?
thanks every~~
--
View this message in context: http://forum.world.st/copy-Excel-s-range-then-drag-into-dataset-widget-tp3308230p3308230.html
Sent from the VisualWorks mailing list archive at Nabble.com.
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc


This message may contain confidential information and is intended for specific recipients unless explicitly noted otherwise. If you have reason to believe you are not an intended recipient of this message, please delete it and notify the sender. This message may not represent the opinion of IntercontinentalExchange, Inc. (ICE), its subsidiaries or affiliates, and does not constitute a contract or guarantee. Unencrypted electronic mail is not secure and the recipient of this message is expected to provide safeguards from viruses and pursue alternate means of communication where privacy or a binding message is desired.


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: copy Excel's range then drag into dataset widget

loveflying000
In reply to this post by Georg Heeg
Georg

Thank you so much for your kindness
I have read your ESUG presentation in
http://esug.org/data/ESUG2010/03Wednesday/2010-ESUG-Heeg-Excel.pdf 

and got some clues about automation classes

from example I'm learning how to manipulate the windows interface COM?

any way, thank you for your help!
I think that I' m on my way :)

If posible ,would you mind plus my MSN account? :)
It's my pleasure~~
My MSN:
yang_yangsh@hotmail.com
Reply | Threaded
Open this post in threaded view
|

Re: copy Excel's range then drag into dataset widget

loveflying000
In reply to this post by Paul Baumann
Dear Paul Baumann

Thank you for your kindful example code!
It makes greate helpfulness to me!~

I think i should learn some information about OS-WindowsXXXX package~~

Good luck to you everybody~~