MarvinMolecule in JTable to Excel

User 9852713200

25-01-2006 20:18:16

Hello,





I have a JTable, which has a column called "Structure". Each table cell in this column contains a MarvinViewPane.





The question is how I can export this structure column into an Excel file, which will capture all structure information via JPEG/GIF format?





We are currently using MarvinBeans 4.0.2.





thanks,

ChemAxon 7c2d26e5cf

27-01-2006 15:20:00

I have not got experience in this issue. There is only a JSP example for Excel sheet generation. Probably, it can useful for you:


http://www.chemaxon.com/marvin/examples/excelsheet-generation/

ChemAxon 7c2d26e5cf

27-01-2006 16:04:28

I have found a couple of tools for generating an Excel document with Java:


http://www.andykhan.com/jexcelapi/index.html


http://jakarta.apache.org/poi/

ChemAxon 7c2d26e5cf

27-01-2006 17:00:30

About my first suggestion (JSP example):


Actually, the JSP example generates a html document that includes a table with images.


Since Excel can handle HTML, generating an HTML from your JTable can be the alternative way to export images into Excel.


In this case, save each molecule in the JTable in a temporary file then create an HTML. Embed images into HTML by using their references in the src attribute of the image tag.

User 9852713200

27-01-2006 19:14:44

Hi Tamas,





Thank you very much for your reply! I'll try your suggestions and see how they go.





thanks again,