Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SCODOC_R6A06
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jean-Marie Place
SCODOC_R6A06
Commits
8bd92fd7
Commit
8bd92fd7
authored
5 months ago
by
Emmanuel Viennet
Browse files
Options
Downloads
Patches
Plain Diff
Code cleaning
parent
8ddab219
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
app/scodoc/sco_excel.py
+6
-9
6 additions, 9 deletions
app/scodoc/sco_excel.py
with
6 additions
and
9 deletions
app/scodoc/sco_excel.py
+
6
−
9
View file @
8bd92fd7
...
@@ -53,6 +53,7 @@ from app.scodoc import notesdb, sco_preferences
...
@@ -53,6 +53,7 @@ from app.scodoc import notesdb, sco_preferences
class
COLORS
(
Enum
):
class
COLORS
(
Enum
):
"
Couleurs de base pour les styles excel
"
BLACK
=
"
FF000000
"
BLACK
=
"
FF000000
"
WHITE
=
"
FFFFFFFF
"
WHITE
=
"
FFFFFFFF
"
RED
=
"
FFFF0000
"
RED
=
"
FFFF0000
"
...
@@ -382,24 +383,20 @@ class ScoExcelSheet:
...
@@ -382,24 +383,20 @@ class ScoExcelSheet:
# recopie des styles
# recopie des styles
if
style
is
None
:
if
style
is
None
:
style
=
self
.
default_style
style
=
self
.
default_style
if
"
font
"
in
style
:
cell
.
font
=
style
[
"
font
"
]
if
"
alignment
"
in
style
:
if
"
alignment
"
in
style
:
cell
.
alignment
=
style
[
"
alignment
"
]
cell
.
alignment
=
style
[
"
alignment
"
]
if
"
border
"
in
style
:
if
"
border
"
in
style
:
cell
.
border
=
style
[
"
border
"
]
cell
.
border
=
style
[
"
border
"
]
if
"
fill
"
in
style
:
if
"
fill
"
in
style
:
cell
.
fill
=
style
[
"
fill
"
]
cell
.
fill
=
style
[
"
fill
"
]
if
"
font
"
in
style
:
cell
.
font
=
style
[
"
font
"
]
if
"
number_format
"
in
style
:
if
"
number_format
"
in
style
:
cell
.
number_format
=
style
[
"
number_format
"
]
cell
.
number_format
=
style
[
"
number_format
"
]
if
"
fill
"
in
style
:
if
comment
is
not
None
:
cell
.
fill
=
style
[
"
fill
"
]
if
"
alignment
"
in
style
:
cell
.
alignment
=
style
[
"
alignment
"
]
if
not
comment
is
None
:
cell
.
comment
=
Comment
(
comment
,
"
scodoc
"
)
cell
.
comment
=
Comment
(
comment
,
"
scodoc
"
)
lines
=
comment
.
splitlines
()
lines
=
comment
.
splitlines
()
cell
.
comment
.
width
=
7
*
max
(
[
len
(
line
)
for
line
in
lines
]
)
if
lines
else
7
cell
.
comment
.
width
=
7
*
max
(
len
(
line
)
for
line
in
lines
)
if
lines
else
7
cell
.
comment
.
height
=
20
*
len
(
lines
)
if
lines
else
20
cell
.
comment
.
height
=
20
*
len
(
lines
)
if
lines
else
20
# test datatype to overwrite datetime format
# test datatype to overwrite datetime format
...
@@ -415,7 +412,7 @@ class ScoExcelSheet:
...
@@ -415,7 +412,7 @@ class ScoExcelSheet:
def
make_row
(
self
,
values
:
list
,
style
=
None
,
comments
=
None
)
->
list
:
def
make_row
(
self
,
values
:
list
,
style
=
None
,
comments
=
None
)
->
list
:
"
build a row
"
"
build a row
"
# TODO
make possible
differents styles in a row
# TODO
allow
differents styles in a row
if
comments
is
None
:
if
comments
is
None
:
comments
=
[
None
]
*
len
(
values
)
comments
=
[
None
]
*
len
(
values
)
return
[
return
[
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment