예제 #1
0
def write_excel():
    header = ["第一季度", "第二季度", "第三季度", "第四季度"]
    file_path = "C:/Users/liuchenhu/Desktop/文档/excel_test.xlsx"
    body = list()
    for item in range(1, 10):
        line = list()
        for i in range(1, len(header) + 1):
            line.append(i * random.randint(1, 10))
        body.append(line)
    excel_util.create_excel(header, body, file_path)
예제 #2
0
def storage_excel(gzbd_data):
    header = ["地区", "日期", "确诊数", "境外输入数", "治愈数", "死亡数", "隔离数", "观察数"];
    body = list();
    for item in gzbd_data:
        line = [];
        line.append(item["日期"]);
        line.append(item["地区"]);
        line.append(item.get("确诊数", None));
        line.append(item.get("境外输入数", None));
        line.append(item.get("治愈数", None));
        line.append(item.get("死亡数", None));
        line.append(item.get("隔离数", None));
        line.append(item.get("观察数", None));
        body.append(line);
    file_path = "/temp/gzbd_data.xlsx";
    excel_util.create_excel(header, body, file_path);
예제 #3
0
 def create_layout_excel(cls):
     headers = [
         "RUN", "Nombres", "Apellido Paterno", "Apellido Materno",
         "Puntaje Ingreso", "Sexo (MASCULINO/FEMENINO/NO DEFINIDO)",
         "Email", "Telefono", "Calle", "Numero", "Comuna", "Villa/Depto",
         "Id. Curso", "Id. Colegio"
     ]
     result_list = [Colegio.export_to_excel(), Curso.export_to_excel()]
     return create_excel(result_list, headers, "Formato_alumnos")
예제 #4
0
 def create_layout_excel(cls, topicos):
     headers = ["Numero", "Alternativa Correcta", "Id. Topico"]
     result_list = [Topico.export_to_excel(topicos)]
     return create_excel(result_list, headers, "Formato_preguntas")
예제 #5
0
 def create_layout_excel(cls):
     headers = ["RUT", "Nombres", "Apellido Paterno", "Apellido Materno", "Email",
                "Telefono", "Calle", "Numero", "Comuna", "Villa/Depto", "RUN Alumno"]
     result_list = [Alumno.export_to_excel()]
     return create_excel(result_list, headers, "Formato_apoderados")
예제 #6
0
 def create_layout_excel(cls):
     headers = ["Nombre","Calle","Numero","Comuna"]
     result_list = []
     return create_excel(result_list, headers, "Formato_colegios")