We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

How to copy system clipboard contents into a worksheet

We are using Aspose.Cells for Java, 7.4.1. Is there a way to copy the contents of system clipboard into a worksheet?

For example, I have 2 applications running. One is Microsoft Office, the other is a Java application built on top of Aspose.Cells. I copy and paste some cells from Microsoft Office to system’s clipboard, then I’d like to import the data from system clipboard to the Java application using Aspose.Cells APIs, is there a way to do this? Please advise. Thank you.

Hi,


Well, there is no such APIs in Aspose.Cells for Java to get/ copy data from System clipboard. You have to use your own codes to first retrieve data from the system clipboard. I think you may use some built-in JAVA APIs to retreive data from the system clipboard, see the documents for your reference:
http://stackoverflow.com/questions/7105778/java-get-pure-text-from-clipboard
http://www.avajava.com/tutorials/lessons/how-do-i-get-a-string-from-the-clipboard.html

Once you retreive data from the system clipboard, then you may try to use Aspose.Cells APIs to paste it in the worksheet cells, see the documents for your reference:
http://www.aspose.com/docs/display/cellsjava/Adding+Data+to+Cells
http://www.aspose.com/docs/display/cellsjava/Importing+Data+to+Worksheets

Thank you.