'pyçå­åžåå¥å°xlsx'

def writeNewXlsx(self):

    def getWorkbook():
        (dirs, filename) = os.path.split(self.dstfile)
        if (not os.path.isdir(dirs)):
            os.makedirs(dirs)
        return ExcelTool(self.dstfile)
    if (self.xbook is not None):
        self.xbook.close()
        self.xbook = None
    self.xbook = getWorkbook()
    if os.path.isfile(self.dstfile):
        self.xbook.getWorkbook(forcedClose=True)
    if (self.xbook.getXApp().Workbooks.Count == 0):
        newWB = self.xbook.getXApp().Workbooks.Add()
        newWB.SaveAs(self.dstfile)
        newWB.Close()
    if (self.xbook.getXLSX() is None):
        if (not self.xbook.getWorkbook(forcedClose=True)):
            print 'unknow    error'
            return
    if (self.sourcefile != ''):
        self.writeXlsxWithC()
    else:
        self.writeXlsxWithoutC()
