I use ooxml.doc.Text
, and need to know that text is in a center, left, or in right.
In Text
i have only these functions/values: 'parent', 'ppr', 'reset', 'rpr', 'text', 'value'
, in this class not have aligment
variable.
How I can get that?
Asked
Active
Viewed 49 times
-2

Always-prog
- 5
- 2
-
Please post what you have tried so far – Rachel Gallen Jan 19 '21 at 12:16
-
@RachelGallen I not tried anything. I need to know how to get alignment. – Always-prog Jan 19 '21 at 13:21
1 Answers
0
Do you need to go directly into the xml for that?
d = Document()
alignment = d.paragraphs[0].paragraph_format.alignment
print(alignment)
Otherwise, I don't think, that you'll find that information in .Text I think. I might be wrong, but I think, that you define the alignment on the paragraph-level.