Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

There is no fill method in excelpy, but there is font color changes, you'd essentially be post processing after exporting the data to an excel workbook. I'd recommned importing excelpy and running help(excelpy) in the terminal to get the docstrings of the module and paste those into notepad and have a look around to see all of the methods available to you.

import excelpy

=============Make your Workbook==============

savelocation = r'C:\Users\cphillips2\Downloads\testing1.xlsx' wb = excelpy.workbook() wb.setcell('a2', 'Hello World')

=============Here you could conditionally set the font color and stuff using excelpy methods==============

wb.fontcolor(address='a2', color='green') wb.save(savelocation) wb.close()

If you are generally needing more complex formatting, I'd look to excelpy to get the data from pss/e to excel, but then another module like xlrd or xlwings to post process the excel file and format how you'd like it.

There is no fill method in excelpy, but there is font color changes, you'd essentially be post processing after exporting the data to an excel workbook. I'd recommned importing excelpy and running help(excelpy) in the terminal to get the docstrings of the module and paste those into notepad and have a look around to see all of the methods available to you.

import excelpy

=============Make your Workbook==============

save_location = r'C:\Users\cphillips2\Downloads\testing1.xlsx'

savelocation = r'C:\Users\cphillips2\Downloads\testing1.xlsx' wb = excelpy.workbook() wb.setcell('a2', excelpy.workbook()

wb.set_cell('a2', 'Hello World')

=============Here you could conditionally set the font color and stuff using excelpy methods==============

wb.font_color(address='a2', color='green')

wb.fontcolor(address='a2', color='green') wb.save(savelocation) wb.save(save_location)

wb.close()

If you are generally needing more complex formatting, I'd look to excelpy to get the data from pss/e to excel, but then another module like xlrd or xlwings to post process the excel file and format how you'd like it.

There is no fill method in excelpy, but there is font color changes, you'd changes and some other formatting methods available that might be of some use. You'd essentially be post processing after exporting the data to an excel workbook. I'd recommned importing excelpy and running help(excelpy) in the terminal to get the docstrings of the module and paste those into notepad and have a look around to see all of the methods available to you.

import excelpy

save_location = r'C:\Users\cphillips2\Downloads\testing1.xlsx'

wb = excelpy.workbook()

wb.set_cell('a2', 'Hello World')

wb.font_color(address='a2', color='green')

wb.save(save_location)

wb.close()

If you are generally needing more complex formatting, I'd look to excelpy to get the data from pss/e to excel, but then another module like xlrd or xlwings to post process the excel file and format how you'd like it.