String year = "2015"; String month = "January" if(year == "+year+") { if(month == "January"){ String fileName = "c:\\สอบถาม\\Report\\"+year+"\\January\\Report Inquire '"+n+"'_ID.'"+s+"' "+month+" "+year+".xls"; }else if(month == "February"){ String fileName = "c:\\สอบถาม\\Report\\"+year+"\\February\\Report Inquire '"+n+"'_ID.'"+s+"' "+month+" "+year+".xls"; }else if(month == "March"){ String fileName = "c:\\สอบถาม\\Report\\"+year+"\\March\\Report Inquire '"+n+"'_ID.'"+s+"' "+month+" "+year+".xls"; }else if(month == "April"){ String fileName = "c:\\สอบถาม\\Report\\"+year+"\\April\\Report Inquire '"+n+"'_ID.'"+s+"' "+month+" "+year+".xls"; }else if(month == "May"){ String fileName = "c:\\สอบถาม\\Report\\"+year+"\\May\\Report Inquire '"+n+"'_ID.'"+s+"' "+month+" "+year+".xls"; }else if(month == "June"){ String fileName = "c:\\สอบถาม\\Report\\"+year+"\\June\\Report Inquire '"+n+"'_ID.'"+s+"' "+month+" "+year+".xls"; }else if(month == "July"){ String fileName = "c:\\สอบถาม\\Report\\"+year+"\\July\\Report Inquire '"+n+"'_ID.'"+s+"' "+month+" "+year+".xls"; }else if(month == "August"){ String fileName = "c:\\สอบถาม\\Report\\"+year+"\\August\\Report Inquire '"+n+"'_ID.'"+s+"' "+month+" "+year+".xls"; }else if(month == "September"){ String fileName = "c:\\สอบถาม\\Report\\"+year+"\\September\\Report Inquire '"+n+"'_ID.'"+s+"' "+month+" "+year+".xls"; }else if(month == "October"){ String fileName = "c:\\สอบถาม\\Report\\"+year+"\\October\\Report Inquire '"+n+"'_ID.'"+s+"' "+month+" "+year+".xls"; }else if(month == "November"){ String fileName = "c:\\สอบถาม\\Report\\"+year+"\\November\\Report Inquire '"+n+"'_ID.'"+s+"' "+month+" "+year+".xls"; }else if(month == "December"){ String fileName = "c:\\สอบถาม\\Report\\"+year+"\\December\\Report Inquire '"+n+"'_ID.'"+s+"' "+month+" "+year+".xls"; } } else { System.out.println("Please,Input Year."); }
WritableWorkbook workbook = Workbook.createWorkbook(new File(fileName));
String year = "2015"; String month = "January" String fileName = "c:\\สอบถาม\\Report\\"+year+"\\"+month+"\\Report Inquire "+n+"_ID."+s+" "+month+" "+year+".xls";
String year = "2015"; String month = "January" String fileName=""; if(year == "+year+") { if(month == "January"){ fileName = "c:\\สอบถาม\\Report\\"+year+"\\January\\Report Inquire '"+n+"'_ID.'"+s+"' "+month+" "+year+".xls"; }else if(month == "February"){ fileName = "c:\\สอบถาม\\Report\\"+year+"\\February\\Report Inquire '"+n+"'_ID.'"+s+"' "+month+" "+year+".xls"; }else if(month == "March"){ fileName = "c:\\สอบถาม\\Report\\"+year+"\\March\\Report Inquire '"+n+"'_ID.'"+s+"' "+month+" "+year+".xls"; }else if(month == "April"){ fileName = "c:\\สอบถาม\\Report\\"+year+"\\April\\Report Inquire '"+n+"'_ID.'"+s+"' "+month+" "+year+".xls"; }else if(month == "May"){ fileName = "c:\\สอบถาม\\Report\\"+year+"\\May\\Report Inquire '"+n+"'_ID.'"+s+"' "+month+" "+year+".xls"; }else if(month == "June"){ fileName = "c:\\สอบถาม\\Report\\"+year+"\\June\\Report Inquire '"+n+"'_ID.'"+s+"' "+month+" "+year+".xls"; }else if(month == "July"){ fileName = "c:\\สอบถาม\\Report\\"+year+"\\July\\Report Inquire '"+n+"'_ID.'"+s+"' "+month+" "+year+".xls"; }else if(month == "August"){ fileName = "c:\\สอบถาม\\Report\\"+year+"\\August\\Report Inquire '"+n+"'_ID.'"+s+"' "+month+" "+year+".xls"; }else if(month == "September"){ fileName = "c:\\สอบถาม\\Report\\"+year+"\\September\\Report Inquire '"+n+"'_ID.'"+s+"' "+month+" "+year+".xls"; }else if(month == "October"){ fileName = "c:\\สอบถาม\\Report\\"+year+"\\October\\Report Inquire '"+n+"'_ID.'"+s+"' "+month+" "+year+".xls"; }else if(month == "November"){ fileName = "c:\\สอบถาม\\Report\\"+year+"\\November\\Report Inquire '"+n+"'_ID.'"+s+"' "+month+" "+year+".xls"; }else if(month == "December"){ fileName = "c:\\สอบถาม\\Report\\"+year+"\\December\\Report Inquire '"+n+"'_ID.'"+s+"' "+month+" "+year+".xls"; } } else { System.out.println("Please,Input Year."); } // เรียกใช้บรรทัดนี้ได้เลย เพราะมันเป็นการประกาศให้ใช้ได้ทั้ง Function WritableWorkbook workbook = Workbook.createWorkbook(new File(fileName));
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง