我有一些excel,我需要找到在excel中输入的数据序列,
对于前: -
A1 CaseId A2 1.1
B1接受B2
C1 LoginID C2 newUser
D1密码D2 newUser @ 123
E1 LoginBtn E2
F1 CollnApp F2
G1 ScreenShot G2没有
H1 HighLight H2是的
I1描述I2 LoginTC
J1执行J2是
其中A1 .... J2表示excel单元格
(请注意,我不想添加另一行说明序列,然后将其读入地图并执行)
提前致谢
答案 0 :(得分:0)
这是你要做的,阅读csv内容:
public static void main (String[]args) throws IOException{
BufferedReader br = null;
String[] parameters;
try {
String sCurrentLine;
br = new BufferedReader(new FileReader("C:\\testing.csv"));
while ((sCurrentLine = br.readLine()) != null) {
System.out.println(sCurrentLine);//this is just for your knowing purpose that lines are being read
parameters = sCurrentLine.split(",");
//now here you do what ever you want to do with the data
}
} catch (IOException e) {
e.printStackTrace();
} finally {
try {
if (br != null)br.close();
} catch (IOException ex) {
ex.printStackTrace();
}
}