01.
String year =
"2015"
;
02.
String month =
"January"
03.
String fileName=
""
;
04.
if
(year ==
"+year+"
)
05.
{
06.
if
(month ==
"January"
){
07.
fileName =
"c:\\สอบถาม\\Report\\"+year+"
\\January\\Report Inquire
'"+n+"'
_ID.
'"+s+"'
"+month+"
"+year+"
.xls";
08.
}
else
if
(month ==
"February"
){
09.
fileName =
"c:\\สอบถาม\\Report\\"+year+"
\\February\\Report Inquire
'"+n+"'
_ID.
'"+s+"'
"+month+"
"+year+"
.xls";
10.
}
else
if
(month ==
"March"
){
11.
fileName =
"c:\\สอบถาม\\Report\\"+year+"
\\March\\Report Inquire
'"+n+"'
_ID.
'"+s+"'
"+month+"
"+year+"
.xls";
12.
}
else
if
(month ==
"April"
){
13.
fileName =
"c:\\สอบถาม\\Report\\"+year+"
\\April\\Report Inquire
'"+n+"'
_ID.
'"+s+"'
"+month+"
"+year+"
.xls";
14.
}
else
if
(month ==
"May"
){
15.
fileName =
"c:\\สอบถาม\\Report\\"+year+"
\\May\\Report Inquire
'"+n+"'
_ID.
'"+s+"'
"+month+"
"+year+"
.xls";
16.
}
else
if
(month ==
"June"
){
17.
fileName =
"c:\\สอบถาม\\Report\\"+year+"
\\June\\Report Inquire
'"+n+"'
_ID.
'"+s+"'
"+month+"
"+year+"
.xls";
18.
}
else
if
(month ==
"July"
){
19.
fileName =
"c:\\สอบถาม\\Report\\"+year+"
\\July\\Report Inquire
'"+n+"'
_ID.
'"+s+"'
"+month+"
"+year+"
.xls";
20.
}
else
if
(month ==
"August"
){
21.
fileName =
"c:\\สอบถาม\\Report\\"+year+"
\\August\\Report Inquire
'"+n+"'
_ID.
'"+s+"'
"+month+"
"+year+"
.xls";
22.
}
else
if
(month ==
"September"
){
23.
fileName =
"c:\\สอบถาม\\Report\\"+year+"
\\September\\Report Inquire
'"+n+"'
_ID.
'"+s+"'
"+month+"
"+year+"
.xls";
24.
}
else
if
(month ==
"October"
){
25.
fileName =
"c:\\สอบถาม\\Report\\"+year+"
\\October\\Report Inquire
'"+n+"'
_ID.
'"+s+"'
"+month+"
"+year+"
.xls";
26.
}
else
if
(month ==
"November"
){
27.
fileName =
"c:\\สอบถาม\\Report\\"+year+"
\\November\\Report Inquire
'"+n+"'
_ID.
'"+s+"'
"+month+"
"+year+"
.xls";
28.
}
else
if
(month ==
"December"
){
29.
fileName =
"c:\\สอบถาม\\Report\\"+year+"
\\December\\Report Inquire
'"+n+"'
_ID.
'"+s+"'
"+month+"
"+year+"
.xls";
30.
}
31.
}
32.
else
33.
{
34.
System.
out
.println(
"Please,Input Year."
);
35.
}
36.
37.
38.
39.
WritableWorkbook workbook = Workbook.createWorkbook(
new
File(fileName));