JavaExcel is an open source package for an Excel form. There are many articles on the Internet, but most of them are two examples, one reads a write. For other operations such as formulas, the operations of the chart basically have no introduction, which may be relatively low in JXL's version. Today, I get a version through the friends in the group, it is estimated that it is 2.0 or more. But only one JAR package for me, even the document is not, the author's website can't get it, I have to use JAD to compile the JAR package. Foundation has been provided with basic operational functions of the picture,
Public static void write () throws exception {WRITABLORKBOOK WWB = Workbook.createworkbook (new file ("c: /1.xls"); Writablesheet WS = Wwb.createsheet ("Test Sheet 1", 0); File File = New File ("c: //jbproject//pvs//webroot/WeekHit//1109496996281.png"); WritableImage Image = New WritableImage (1, 4, 6, 18, file); ws.addimage (image); WWB .write (); wwb.close ();
Very simple and inserted in the unit, but it is more parameters. WritableImage has inherited the DRAW, which is just a way to construct a method. The last parameter is not used. The previous four parameters are Double Double. In turn, it is x, y, width, height, note, the wide and high here is not the width and high of the picture, but the number of units to be occupied by the picture, because the inherited draw so his type must be Double, I haven't seen it in the specific situation :) Because I am in a hurry, I have completed the function, and I have time to study after other future. I will continue to write the experience in use to everyone in the future.
If you have reprint, please keep the author and source thank you! QQ: 221704msn: flyly@yeah.net