You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Joachim Draeger <jd...@gmx.de> on 2005/02/15 12:12:23 UTC

sending formatted Excel data to clibboard

Hi!

I want to create an formatted Excel table in an Applet and copy it to 
the clipboard without creating a file.
I have not found any information about this concern.
Is that possible with HSSF? How?

thanks and regards,

Joachim


---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/


Re: sending formatted Excel data to clibboard

Posted by Joachim Draeger <jd...@gmx.de>.
Hi,

thank you for your answer.

Daniel de Miguel González wrote:

>> I want to create an formatted Excel table in an Applet and copy it to 
>> the clipboard without creating a file.
>> I have not found any information about this concern.
>> Is that possible with HSSF? How?
>

> I think Clipboard is no related to POI.
>
> you have to check the class java.awt.datatransfer.Clipboard

Sending data to clipboard is not the problem.
I'm already sending the following to the clipboard:

a1 \t b1 \t c1 \t\n
a2 \t b2 \t c2 \t\n
a3 \t b3 \t c3 \t\n

Now I want to influence the size, borders, font  and colors of the cells.
On the HSSF Page I can learn how to create Excel files.
But how to send a worksheet to the clipboard?

regards,

Joachim

---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/


Re: sending formatted Excel data to clibboard

Posted by Daniel de Miguel González <dm...@tid.es>.
Hi.
I think Clipboard is no related to POI.

you have to check the class java.awt.datatransfer.Clipboard
In your application you 'll have to retrieve al the content  you want to 
copy to the clipboard in a string, a then put it in the clipboard...
<code>
String content="this is the content to be copied to the clipBoard"
Clipboard clipboard = this.getToolkit().getSystemClipboard(); //'this' 
is a java.awt.Component class that must implements ClipboardOwner
clipboard.setContents(content, this);
</code>

Daniel de Miguel González

Joachim Draeger escribió:

>
> Hi!
>
> I want to create an formatted Excel table in an Applet and copy it to 
> the clipboard without creating a file.
> I have not found any information about this concern.
> Is that possible with HSSF? How?
>
> thanks and regards,
>
> Joachim
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
> Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
> The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/