         var flag = 0
         
         //30(31)日分繰り返すループ
-        for(var i = 0; i < monthrange.length; i++){
+        
+        for i in 0 ..< monthrange.length {
             let shiftdb = ShiftDB()
             let shiftdetaildb = ShiftDetailDB()
             

        
        var staffstring = ""
        
        for(var i = 0; i < DBmethod().StaffNumberGet(); i++){
            let nowstaff = staffcellpositionarray[i]
            let replaceday = nowstaff.stringByReplacingOccurrencesOfString("F", withString: cellrow[day])
            

                case 1:         //1日〜10日までの場合
                    shiftdetaildb.year = CommonMethod().JudgeYearAndMonth(worksheet.P1).endcoursmonthyear
                    shiftdetaildb.month = CommonMethod().JudgeYearAndMonth(worksheet.P1).endcoursmonth
                    date += 1
                    
                default:
                    break
