The styleframe seems to be a wrapper for pandas and openpyxl, so ExcelWriter
is probably calling it pandas.
Library that wraps pandas and openpyxl and allow easy styling of dataframes.
Creating ExcelWriter object:
ew=StyleFrame.ExcelWriter(r'C:\my_excel.xlsx')
sf.to_excel(ew)
ew.save()
For the time being, there is a mode=
parameter in the ExcelWriter of the pandas:
class pandas.ExcelWriter(path,engine=None,**kwargs)
In the styleframe specification document below, there is no ExcelWriter item, and I am not sure how to call it (whether the parameters are passed directly to Pandas?).:
Docs AP API Documentation st styleframe
Looking at the source code, it seems that it does not accept parameters other than path
.
@classmethod
def ExcelWriter(cls, path):
return pd.ExcelWriter(path,engine='openpyxl')
Therefore, mode='a'
will not work.
The alternative is read_excel() and then add data to that styleframe before to_excel().
© 2024 OneMinuteCode. All rights reserved.