1
이 예 (http://xlsxwriter.readthedocs.io/working_with_conditional_formats.html)에 따라 열의 색 눈금을 사용할 수 있습니다.xlsxwriter의 전체 열에 색상 스케일을 사용하는 방법
워드 프로세서 예 :
caption = 'Examples of color scales and data bars. Default colors.'
data = range(1, 13)
worksheet7.write('A1', caption)
worksheet7.write('B2', "3 Color Scale")
for row, row_data in enumerate(data):
worksheet7.write(row + 2, 1, row_data)
worksheet7.conditional_format('B3:B14', {'type': '3_color_scale'})
당신은 내가없이 그것의 전체 B 열에 포맷을 적용 할 포맷이 제 1의 소정의 B 칼럼 영역에 적용되는 것을 볼 수있다 길이.
나는이 작업을 수행 할 때 :
caption = 'Examples of color scales and data bars. Default colors.'
data = range(1, 13)
worksheet7.write('A1', caption)
worksheet7.write('B2', "3 Color Scale")
for row, row_data in enumerate(data):
worksheet7.write(row + 2, 1, row_data)
worksheet7.conditional_format('B:B', {'type': '3_color_scale'})
# or this worksheet7.conditional_format('$B:$B', {'type': '3_color_scale'})
나는 다음과 같은 오류 얻을 :
File "build\bdist.win-amd64\egg\xlsxwriter\worksheet.py", line 85, in cell_wrapper
File "build\bdist.win-amd64\egg\xlsxwriter\utility.py", line 108, in xl_cell_to_rowcol
AttributeError: 'NoneType' object has no attribute 'group'
이 작업을 수행하는 적절한 방법은 무엇입니까?
감사합니다. 이것이 어떤 방식 으로든 성능에 영향을 줍니까? 엑셀 세대가 더 느린 걸까? –
XlsxWriter의 성능에 영향을 미치지 않으며 파일 생성 속도가 느리지 않습니다. – jmcnamara