         let shiftnsdate = MonthlySalaryShow().DateSerial(MonthlySalaryShow().Changecalendar(shiftyearandmonth.year, calender: "JP"), month: shiftyearandmonth.startcoursmonth, day: 1)
         let c = NSCalendar.currentCalendar()
         let monthrange = c.rangeOfUnit([NSCalendarUnit.Day],  inUnit: [NSCalendarUnit.Month], forDate: shiftnsdate)
-        
-        let XLSX = self.AAA()
-        
-//        let documentPath = XLSX.A
-//        let spreadsheet = XLSX.B
-        let worksheet = XLSX.C
-        
-        
+        let worksheet = self.SetXLSX()
         
         var date = 11
         let staffcellposition = self.StaffCellPositionGet()     //スタッフの名前が記載されているセル場所 ex.)F8,F9

    //返り値は
    //年(和暦)、11日〜月末までの月、1日〜10日までの月
    func JudgeYearAndMonth() -> (year: Int, startcoursmonth: Int, endcoursmonth: Int){
        
        let XLSX = self.AAA()
        
        //        let documentPath = XLSX.A
        //        let spreadsheet = XLSX.B
        let worksheet = XLSX.C

        let P1String: String = worksheet.cellForCellReference("P1").stringValue()
        let P1NSString = P1String as NSString

    //表中にあるスタッフ名の場所を返す
    func StaffCellPositionGet() -> Array<String>{
        
        let worksheet = self.SetXLSX()
        var array:[String] = []
        
        while(true){
            let Fcell: String = worksheet.cellForCellReference(mark+String(number)).stringValue()
