deleted unused comments from excelexporters
parent
14dddada7f
commit
e65cd550a2
|
@ -27,7 +27,6 @@ def export(report,
|
||||||
####################################################################################################################
|
####################################################################################################################
|
||||||
if report is None:
|
if report is None:
|
||||||
return None
|
return None
|
||||||
print(report)
|
|
||||||
|
|
||||||
####################################################################################################################
|
####################################################################################################################
|
||||||
# Step 2: Generate excel file from the report data
|
# Step 2: Generate excel file from the report data
|
||||||
|
@ -503,8 +502,6 @@ def generate_excel(report,
|
||||||
ca_len = len(report['reporting_period']['names'])
|
ca_len = len(report['reporting_period']['names'])
|
||||||
real_timestamps_len = timestamps_data_not_equal_0(report['parameters']['timestamps'])
|
real_timestamps_len = timestamps_data_not_equal_0(report['parameters']['timestamps'])
|
||||||
table_row = current_row_number + 2 + ca_len * 6 + real_timestamps_len * 6
|
table_row = current_row_number + 2 + ca_len * 6 + real_timestamps_len * 6
|
||||||
# ca_len * 6 :The total length of linear tables of tailed data
|
|
||||||
# real_timestamps_len * 6 :The total length of linear tables of related parameters
|
|
||||||
chart_start_row_number = current_row_number + 1
|
chart_start_row_number = current_row_number + 1
|
||||||
if "timestamps" not in reporting_period_data.keys() or \
|
if "timestamps" not in reporting_period_data.keys() or \
|
||||||
reporting_period_data['timestamps'] is None or \
|
reporting_period_data['timestamps'] is None or \
|
||||||
|
@ -527,7 +524,6 @@ def generate_excel(report,
|
||||||
if len(time) > 0:
|
if len(time) > 0:
|
||||||
has_data = True
|
has_data = True
|
||||||
max_row = table_row + len(time)
|
max_row = table_row + len(time)
|
||||||
print("max_row", max_row)
|
|
||||||
|
|
||||||
if has_data:
|
if has_data:
|
||||||
for i in range(0, len(time)):
|
for i in range(0, len(time)):
|
||||||
|
|
|
@ -2,7 +2,6 @@ import base64
|
||||||
import uuid
|
import uuid
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
|
|
||||||
import openpyxl.utils
|
import openpyxl.utils
|
||||||
from openpyxl.chart import PieChart, LineChart, Reference
|
from openpyxl.chart import PieChart, LineChart, Reference
|
||||||
from openpyxl.styles import PatternFill, Border, Side, Alignment, Font
|
from openpyxl.styles import PatternFill, Border, Side, Alignment, Font
|
||||||
|
@ -30,7 +29,6 @@ def export(report,
|
||||||
####################################################################################################################
|
####################################################################################################################
|
||||||
if report is None:
|
if report is None:
|
||||||
return None
|
return None
|
||||||
print(report)
|
|
||||||
|
|
||||||
####################################################################################################################
|
####################################################################################################################
|
||||||
# Step 2: Generate excel file from the report data
|
# Step 2: Generate excel file from the report data
|
||||||
|
@ -595,8 +593,7 @@ def generate_excel(report,
|
||||||
ca_len = len(report['reporting_period']['names'])
|
ca_len = len(report['reporting_period']['names'])
|
||||||
real_timestamps_len = timestamps_data_not_equal_0(report['parameters']['timestamps'])
|
real_timestamps_len = timestamps_data_not_equal_0(report['parameters']['timestamps'])
|
||||||
table_row = current_row_number + ca_len * 6 + real_timestamps_len * 6 + 2
|
table_row = current_row_number + ca_len * 6 + real_timestamps_len * 6 + 2
|
||||||
# ca_len * 6 :The total length of linear tables of tailed data
|
|
||||||
# real_timestamps_len * 6 :The total length of linear tables of related parameters
|
|
||||||
chart_start_row_number = current_row_number + 1
|
chart_start_row_number = current_row_number + 1
|
||||||
if "timestamps" not in reporting_period_data.keys() or \
|
if "timestamps" not in reporting_period_data.keys() or \
|
||||||
reporting_period_data['timestamps'] is None or \
|
reporting_period_data['timestamps'] is None or \
|
||||||
|
@ -619,13 +616,11 @@ def generate_excel(report,
|
||||||
if len(time) > 0:
|
if len(time) > 0:
|
||||||
has_data = True
|
has_data = True
|
||||||
max_row = table_row + len(time)
|
max_row = table_row + len(time)
|
||||||
print("max_row", max_row)
|
|
||||||
|
|
||||||
if has_data:
|
if has_data:
|
||||||
for i in range(0, len(time)):
|
for i in range(0, len(time)):
|
||||||
col = 'B'
|
col = 'B'
|
||||||
row = str(table_row+1 + i)
|
row = str(table_row+1 + i)
|
||||||
# col = chr(ord('B') + i)
|
|
||||||
ws[col + row].font = title_font
|
ws[col + row].font = title_font
|
||||||
ws[col + row].alignment = c_c_alignment
|
ws[col + row].alignment = c_c_alignment
|
||||||
ws[col + row] = time[i]
|
ws[col + row] = time[i]
|
||||||
|
|
|
@ -27,7 +27,6 @@ def export(report,
|
||||||
####################################################################################################################
|
####################################################################################################################
|
||||||
if report is None:
|
if report is None:
|
||||||
return None
|
return None
|
||||||
print(report)
|
|
||||||
|
|
||||||
####################################################################################################################
|
####################################################################################################################
|
||||||
# Step 2: Generate excel file from the report data
|
# Step 2: Generate excel file from the report data
|
||||||
|
@ -547,7 +546,6 @@ def generate_excel(report,
|
||||||
if len(time) > 0:
|
if len(time) > 0:
|
||||||
has_data = True
|
has_data = True
|
||||||
max_row = table_row + len(time)
|
max_row = table_row + len(time)
|
||||||
print("max_row", max_row)
|
|
||||||
|
|
||||||
if has_data:
|
if has_data:
|
||||||
for i in range(0, len(time)):
|
for i in range(0, len(time)):
|
||||||
|
|
Loading…
Reference in New Issue