Jun-08-2019, 08:37 PM
hi, I'm scott
I'm reasonably new to python.. but learning as I go
long story as short as I can make it
I have a script that takes some excel data, uses pandas to sort it
then a use openpyxl to add some colors and formatting to several things
the script uses this function
when I upload the file to the web to send to other co-workers, the blank spaces that were colored black... dont show up... they are just white?
anybody have any ideas or has anybody run across this problem before
I can manually color the cells black in excel, and they show up fine when uploaded
only has issues if I use openpyxl to color them
I'm reasonably new to python.. but learning as I go
long story as short as I can make it
I have a script that takes some excel data, uses pandas to sort it
then a use openpyxl to add some colors and formatting to several things
the script uses this function
datecolV = '000000'
##### Colors Between Dates function Black
black_fill = openpyxl.styles.fills.PatternFill(patternType='solid', fgColor=(datecolV))
rownumber = 1
for row in sheet.iter_rows(min_row=2, max_row= sheet.max_row, min_col=8, max_col=8, values_only=True):
rownumber += 1
for cell in row:
if cell == None:
if rownumber > 2 and sheet[str('H' + str(rownumber-1))].value is not None and sheet[str('H' + str(rownumber+1))].value is not None and len(sheet[str('H' + str(rownumber-1))].value) > 9 and len(sheet[str('H' + str(rownumber+1))].value) > 9:
### line below for debugging
#print(sheet[str('H' + str(rownumber-1))].value[0:9] + ' ' + sheet[str('H' + str(rownumber+1))].value[0:9])
if sheet[str('H' + str(rownumber-1))].value[0:9] != sheet[str('H' + str(rownumber+1))].value[0:9] and rownumber >2:
for row2 in sheet.iter_rows (min_row=rownumber, max_row=rownumber):
for cell2 in row2:
cell2.fill = black_fillon the PC.. it returns as black.. works perfectwhen I upload the file to the web to send to other co-workers, the blank spaces that were colored black... dont show up... they are just white?
anybody have any ideas or has anybody run across this problem before
I can manually color the cells black in excel, and they show up fine when uploaded
only has issues if I use openpyxl to color them
