Tag: styleframe

有能力过滤列的excel文件

我需要创build可以被填充的列的excel。 宁愿使用openpyxl,因为我已经使用StyleFrame来deviseexcel。 例

使用StyleFrame从大pandas到Excel:如何禁用包装文本&缩小以适合?

我使用StyleFrame从pandas导出到Excel。 单元格格式化为“包装文本”和“缩小到适合”默认情况下。 (如何)可以更改这些设置? API文档描述了utils模块包含最广泛使用的样式元素值,并且只要Excel能够识别,就可以直接使用utils模块中不存在的值。 在这种情况下,我需要为Excel指定什么? 我如何/在哪里可以找出Excel的期望? 提前谢谢了! 我曾经尝试过的例子: 此代码完美: sf.apply_column_style(cols_to_style=['A'], styler_obj=Styler(bg_color=utils.colors.blue)) 但我的问题是,我不知道要改变什么来closures文本环绕和缩小以适应选项: sf.apply_column_style(cols_to_style=['A'], styler_obj=Styler(text_control=wrap_text.none)) NameError: name 'wrap_text' is not defined sf.apply_column_style(cols_to_style=['A'], styler_obj=Styler(text_control=utils.wrap_text.none)) AttributeError: module 'StyleFrame.utils' has no attribute 'wrap_text' sf.apply_column_style(cols_to_style=['A'], styler_obj=Styler(utils.wrap_text.none)) AttributeError: module 'StyleFrame.utils' has no attribute 'wrap_text' sf.apply_column_style(cols_to_style=['A'], styler_obj=Styler(wrap_text=False)) TypeError: __init__() got an unexpected keyword argument 'wrap_text'