         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()
             

        while(true){
            let Fcell: String = worksheet.sheet.cellForCellReference(mark+String(number)).stringValue()
            if(Fcell.isEmpty){       //セルが空なら進めるだけ
                number++
            }else{
                array.append(mark+String(number))
                number++
            }
            
            if(DBmethod().StaffNumberGet() == array.count){       //設定したスタッフ人数と取り込み数が一致したら

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