Skip to content

Instantly share code, notes, and snippets.

@gdevanla
Last active May 18, 2017 12:55
Show Gist options
  • Save gdevanla/c5aedcd7d2b7989bbbdf8345bf775a66 to your computer and use it in GitHub Desktop.
Save gdevanla/c5aedcd7d2b7989bbbdf8345bf775a66 to your computer and use it in GitHub Desktop.
for color formatting
from openpyxl.styles import Alignment
def format_data(index, col_name):
alignment = Alignment(horizontal=’right’)
if col_name == ‘salary’:
return dict(
alignment=alignment,
number_format='$0.00')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment