finalisation

This commit is contained in:
Jean-Marie Place 2021-09-18 11:08:04 +02:00
parent c955870e1e
commit f7961a135a
2 changed files with 6 additions and 27 deletions

View File

@ -59,22 +59,6 @@ class COLORS(Enum):
LIGHT_YELLOW = "FFFFFF99"
# def send_excel_file(request, data, filename, mime=scu.XLSX_MIMETYPE):
# """publication fichier.
# (on ne doit rien avoir émis avant, car ici sont générés les entetes)
# """
# filename = (
# scu.unescape_html(scu.suppress_accents(filename))
# .replace("&", "")
# .replace(" ", "_")
# )
# request.RESPONSE.setHeader("content-type", mime)
# request.RESPONSE.setHeader(
# "content-disposition", 'attachment; filename="%s"' % filename
# )
# return data
# Un style est enregistré comme un dictionnaire qui précise la valeur d'un attributdans la liste suivante:
# font, border, number_format, fill,...
# (cf https://openpyxl.readthedocs.io/en/stable/styles.html#working-with-styles)
@ -351,10 +335,10 @@ class ScoExcelSheet:
Ce flux pourra ensuite être repris dans send_excel_file (classeur mono feille)
ou pour la génération d'un classeur multi-feuilles
"""
for col in self.column_dimensions.keys():
self.ws.column_dimensions[col] = self.column_dimensions[col]
for col in self.row_dimensions.keys():
self.ws.row_dimensions[col] = self.row_dimensions[col]
for row in self.column_dimensions.keys():
self.ws.column_dimensions[row] = self.column_dimensions[row]
for row in self.row_dimensions.keys():
self.ws.row_dimensions[row] = self.row_dimensions[row]
for row in self.rows:
self.ws.append(row)

View File

@ -34,10 +34,6 @@ import random
import time
from copy import copy
import flask
from flask import request
from app.scodoc.sco_exceptions import ScoValueError
import wtforms.validators
from flask import request, render_template
from flask_login import current_user
@ -50,7 +46,6 @@ from wtforms import (
RadioField,
HiddenField,
SelectMultipleField,
BooleanField,
)
import app.scodoc.sco_utils as scu
import app.scodoc.notesdb as ndb
@ -69,8 +64,8 @@ from app.scodoc.gen_tables import GenTable
from app.scodoc import sco_etud
import sco_version
# _ = lambda x: x # sans babel
# _l = _
_ = lambda x: x # sans babel
_l = _
COORD = "Coordonnées"
SEQ = "Continue"