Skip to content

Export styles from Excel using OpenPyXL (for XlsxWriter -- pyexcel-xlsxwx)

License

Notifications You must be signed in to change notification settings

patarapolw/pyexcel-openpyxlx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pyexcel-openpyxlx

Build Status PyPI version shields.io PyPI license PyPI pyversions

Export styles from Excel using OpenPyXL (for XlsxWriter -- pyexcel-xlsxwx).

Installation

$ pip install pyexcel-openpyxlx

Usage

>>> import pyexcel_openpyxlx
>>> pyexcel_openpyxlx.get_styles('example.xlsx')
{'worksheet': {'hanzi': {'freeze_panes': 'A2', 'column_width': [7.7109375, 28.7109375, 30.7109375, 8.7109375, 10.7109375, 16.7109375, 7.7109375, 6.7109375, 6.7109375, 30.7109375]}, 'sentences': {'freeze_panes': 'A2', 'column_width': [30.7109375, 30.7109375, 30.7109375, 30.7109375, 6.7109375, 6.7109375, 30.7109375]}, 'vocab': {'freeze_panes': 'A2', 'column_width': [7.7109375, 24.7109375, 24.7109375, 30.7109375, 30.7109375, 30.7109375, 7.7109375, 6.7109375, 6.7109375, 8.7109375, 30.7109375]}}}

Exporting to YAML is also possible by specifying out_file.

>>> pyexcel_openpyxlx.get_styles('example.xlsx', out_file='example.yaml')
worksheet:
  hanzi:
    column_width: [7.7109375, 28.7109375, 30.7109375, 8.7109375, 10.7109375, 16.7109375,
      7.7109375, 6.7109375, 6.7109375, 30.7109375]
    freeze_panes: A2
  sentences:
    column_width: [30.7109375, 30.7109375, 30.7109375, 30.7109375, 6.7109375, 6.7109375,
      30.7109375]
    freeze_panes: A2
  vocab:
    column_width: [7.7109375, 24.7109375, 24.7109375, 30.7109375, 30.7109375, 30.7109375,
      7.7109375, 6.7109375, 6.7109375, 8.7109375, 30.7109375]
    freeze_panes: A2

Related projects

  • pyexcel-xlsxwx -- Save pyexcel data with XlsxWriter, while retaining good formatting.

About

Export styles from Excel using OpenPyXL (for XlsxWriter -- pyexcel-xlsxwx)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages