-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathGetRowCount.java
More file actions
26 lines (21 loc) · 752 Bytes
/
Copy pathGetRowCount.java
File metadata and controls
26 lines (21 loc) · 752 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package allTests;
import java.net.URL;
import com.codoid.products.exception.FilloException;
import com.codoid.products.fillo.Connection;
import com.codoid.products.fillo.Fillo;
import com.codoid.products.fillo.Recordset;
public class GetRowCount {
public static void main(String[] args) throws FilloException {
Fillo fillo=new Fillo();
URL path = GetRowCount.class.getResource("sample.xlsx");
Connection connection=fillo.getConnection(path.getFile());
String strQuery="Select * from SalesOrders";
Recordset recordset=connection.executeQuery(strQuery);
System.out.println(recordset.getCount());
while(recordset.next()){
// System.out.println(recordset.getField("OrderDate"));
}
recordset.close();
connection.close();
}
}