openpyxl problem Workbook contains no default style, apply openpyxl's default

143 views
Skip to first unread message

Denis Bourouffala

unread,
Feb 1, 2024, 3:57:06 AMFeb 1
to openpyx...@googlegroups.com
Good Morning,

In the version 3.1.2 of openpyxl, I've message :

UserWarning: Workbook contains no default style, apply openpyxl's default
 warn("Workbook contains no default style, apply openpyxl's default")

This is my prog : 

from openpyxl import load_workbook
filename = "C:\\Analyse Article EPF.xlsx"
wb = load_workbook(filename, data_only=True)
ws_conversion = wb["Conversion"]
print(ws_conversion.max_column)


Where is the problem ?

Thanks to help

Best regards

Charlie Clark

unread,
Feb 1, 2024, 4:32:15 AMFeb 1
to openpyx...@googlegroups.com
On 1 Feb 2024, at 9:56, Denis Bourouffala wrote:

> Where is the problem ?

There isn't a problem: it's just a warning that the workbook contains no stylesheet and that we apply Openpyxl's default. All workbooks should contain a stylesheet so that there is no confusion when styles, including time and date formats are applied.

Charlie

--
Charlie Clark
Managing Director
Clark Consulting & Research
German Office
Sengelsweg 34
Düsseldorf
D- 40489
Tel: +49-203-3925-0390
Mobile: +49-178-782-6226

Denis Bourouffala

unread,
Feb 1, 2024, 4:44:53 AMFeb 1
to openpyx...@googlegroups.com
Thank you

How can I solve or remove this?

Best regards

--
You received this message because you are subscribed to the Google Groups "openpyxl-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openpyxl-user...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/openpyxl-users/934281DC-F0C3-4A30-BCA7-FE99229857B8%40clark-consulting.eu.

Charlie Clark

unread,
Feb 1, 2024, 4:48:07 AMFeb 1
to openpyx...@googlegroups.com
On 1 Feb 2024, at 10:44, Denis Bourouffala wrote:

> Thank you
>
> How can I solve or remove this?

You can configure Python to ignore warnings.
Reply all
Reply to author
Forward
0 new messages