In my program,I will read data from a table,and copy it to the system clipboard,then paste them to the Excel file.But when pasting,the data won't arrange per data per cell,they connect with each others even overcast the column line!How can I solve this problem,and if I will do the same thing on Word,how can I do then?Thank you!
If you put lines into the clipboard with tabs between cells "a1/ta2" they will paste in nicely. I'm not at my regular machine so I don't have a handy reference, but I onced saved a short article about how to cut and paste between Java Swing UI and Excel. You might google for java, excel and clipboard. Other thoughts: * You can use JDBC/ODBC to selecta and insert Excel data like a database. * You can use a generic COM bridge like Jacob to talk to Excel. * There is a special COM bridge just for Excel ... who recalls the name?
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Joined: Aug 19, 2003
Thank Cindy Glass and Stan James!Since I will only paste the data copy from the table,so using the method "use tab"will be ok,thank you!