Beispiel #1
0
def createExcel(fname, data):
    wb = xlwt.Workbook(encoding='utf-8', style_compression=0)
    # 写入sheet1
    writeDataToSheet1(wb, data['listtop'], data['TotalDict'])
    # 写入sheet2
    writeDataToSheet2(wb, data['retdetail'])
    Excel.saveToExcel(fname, wb)
Beispiel #2
0
def createExcel(fname, data):
    wb = xlwt.Workbook(encoding='utf-8', style_compression=0)
    # 写入sheet1
    writeDataToSheet1(wb, data['lis10'])
    # 写入sheet2
    writeDataToSheet2(wb, data['lis11'])
    # 写入sheet3
    writeDataToSheet3(wb, data['lis12'])
    # 写入sheet4
    writeDataToSheet4(wb, data['lis13'])
    # 写入sheet5
    writeDataToSheet5(wb, data['lis14'])
    # 写入sheet6
    writeDataToSheet6(wb, data['lis15'])
    # 写入sheet7
    writeDataToSheet7(wb, data['lis16'])
    # 写入sheet8
    writeDataToSheet8(wb, data['lis17'])
    # 写入sheet9
    writeDataToSheet9(wb, data['lis2'])
    # 写入sheet10
    writeDataToSheet10(wb, data['lis3'])
    # 写入sheet11
    writeDataToSheet11(wb, data['lis4'])

    Excel.saveToExcel(fname, wb)
Beispiel #3
0
def createExcel(fname, data):
    wb = xlwt.Workbook(encoding='utf-8', style_compression=0)
    # 写入sheet1
    writeDataToSheet1(wb, data['rlist'])
    # 写入sheet2
    writeDataToSheet2(wb, data['dlist'])
    Excel.saveToExcel(fname, wb)
Beispiel #4
0
def createExcel(fname, data):
    wb = xlwt.Workbook(encoding='utf-8', style_compression=0)
    #写入sheet1
    writeDataToSheet1(wb, data['listTop'], data['TotalDict'])
    #写入sheet2,sheet3
    writeDataToSheet2(wb, data['listShops'], data['listShopTotal'],
                      data['listDept'])
    Excel.saveToExcel(fname, wb)
Beispiel #5
0
def createExcel(fname, date, rslist, shoplist, grslist, srslist):
    wb = xlwt.Workbook(encoding='utf-8', style_compression=0)
    # 写入sheet1 门店
    writeDataToSheet1(wb, rslist, date)
    # 写入sheet2 类别
    writeDataToSheet2(wb, grslist, date)
    # 写入sheet4 各个门店类别
    writeDataToSheetN(wb, shoplist, srslist, date)
    Excel.saveToExcel(fname, wb)
Beispiel #6
0
def export(fname,yesterday):
    if not Excel.isExist(fname):
        data = query(yesterday)
        createExcel(fname, data['rlist'])
    res = {}
    res['fname'] = fname
    return HttpResponse(json.dumps(res))
Beispiel #7
0
def export(fname):
    if not Excel.isExist(fname):
        data = query()
        createExcel(fname, data)
    res = {}
    res['fname'] = fname
    return HttpResponse(json.dumps(res))
Beispiel #8
0
def export(fname, timeStart, timeEnd):
    if not Excel.isExist(fname):
        res = query(timeStart, timeEnd)
        data = res['data']
        createExcel(fname, data)
    res = {}
    res['fname'] = fname
    return HttpResponse(json.dumps(res))
Beispiel #9
0
def export(fname, date, start, end, yesterday, lastDay):
    if not Excel.isExist(fname):
        data = query(date, start, end, yesterday, lastDay)
        createExcel(fname, date, data['rlist'], data['shoplist'],
                    data['grslist'], data['srslist'])
    res = {}
    res['fname'] = fname
    return HttpResponse(json.dumps(res))
Beispiel #10
0
def createExcel(fname,data):
    wb = xlwt.Workbook(encoding='utf-8',style_compression=0)
    writeDataToSheet1(wb,data)
    Excel.saveToExcel(fname, wb)
Beispiel #11
0
def createExcel(fname, data):
    wb = xlwt.Workbook(encoding='utf-8',style_compression=0)
    #写入sheet1 月累计销售报表
    writeDataToSheet1(wb,data['gslist'],data['sumDict'])
    Excel.saveToExcel(fname, wb)
Beispiel #12
0
def createExcel(fname, data):
    wb = xlwt.Workbook(encoding='utf-8', style_compression=0)
    writeDataToSheet2(wb, data['resList'], data['title'])
    Excel.saveToExcel(fname, wb)