java cyclic taken Excle data (the data stored in the database in excle)

pom:

<groupId>net.sourceforge.jexcelapi</groupId>
<artifactId>jxl</artifactId>
<version>2.6.12</version>

Code Example:

String file = "E: \ TIMcookies \ 1344 \ FileRecv \"; // excle location to save the full path File
Workbook RWB = Workbook.getWorkbook (new new File (File));
Sheet rs = rwb.getSheet (0); // or rwb.getSheet ( "sheet page name")
int = rs.getColumns Clos (); // get all the columns
int rows = rs.getRows (); // get all the rows

for (int I =. 1; I <rows; I ++) {
for (int J = 0; J <Clos; J ++) {
// is the number of columns of the first, the second is the number of rows
// default leftmost number is also so here have an operator ++ J
String bankflownum = rs.getCell (J ++, I) .getContents (); // bank serial
String AccountNum = rs.getCell (J ++, I) .getContents ();
String zjaccountName rs.getCell = ( ++ J, I) .getContents ();
String pzdh = rs.getCell (J ++, I) .getContents ();
String rs.getCell BZ = (J ++, I) .getContents ();
. . .
}

发布了7 篇原创文章 · 获赞 0 · 访问量 96

Guess you like

Origin blog.csdn.net/qq_39052099/article/details/104304132