96SEO 2026-02-19 10:40 42
参考文章#xff1a;https://www.jianshu.com/p/5e00dc2c9f4c

参考文章https://www.jianshu.com/p/5e00dc2c9f4c
win32com.clientsys.path.append(../)def
sns_db.get_clients_by_cds(in_clients)if
client_info[0][client_name]report_month
sns_db.get_report_data(client_cds,
/report/template/template-to-client.xlsxtemplate_chartgtp_path
/report/template/template_chartGTP.xlsm#
获取当前日期并格式化为字符串例如2023-10-23today
datetime.now().strftime(%Y-%m-%d)#
新文件的路径使用当前日期作为文件名的一部分new_file_to_client_path
f/report/output/【{client_name}】月次レポート{report_month}.xlsxnew_file_chartgtp_path
f/report/output/【{client_name}】月次レポート{report_month}_chatGTP.xlsx#
复制模板文件shutil.copy2(template_to_client_path,
new_file_to_client_path)shutil.copy2(template_chartgtp_path,
load_workbook(new_file_to_client_path)sheet_to_client
load_workbook(new_file_chartgtp_path)sheet_chatgpt
Border(leftSide(border_stylethin,
color0070C0),rightSide(border_stylethin,
color0070C0),topSide(border_stylethin,
color0070C0),bottomSide(border_stylethin,
str(row_idx)sheet_to_client[column_a]
ROW()-2sheet_to_client[column_a].border
设置边框sheet_chatgpt[column_a].border
设置边框sheet_to_client[column_a].alignment
垂直居中sheet_chatgpt[column_a].alignment
垂直居中sheet_to_client[column_a].font
Fontsheet_chatgpt[column_a].font
str(current_row[date]).replace(-,
obj_datesheet_chatgpt[column_b]
obj_datesheet_to_client[column_b].border
设置边框sheet_chatgpt[column_b].border
设置边框sheet_to_client[column_b].alignment
垂直居中sheet_chatgpt[column_b].alignment
垂直居中sheet_to_client[column_b].font
Fontsheet_chatgpt[column_b].font
current_row[time]sheet_to_client[column_c]
obj_timesheet_chatgpt[column_c]
obj_timesheet_to_client[column_c].border
设置边框sheet_chatgpt[column_c].border
设置边框sheet_to_client[column_c].alignment
垂直居中sheet_chatgpt[column_c].alignment
垂直居中sheet_to_client[column_c].font
Fontsheet_chatgpt[column_c].font
current_row[url]sheet_to_client[column_d]
urlsheet_to_client[column_d].border
设置边框sheet_chatgpt[column_d].border
设置边框sheet_to_client[column_d].alignment
垂直居中sheet_chatgpt[column_d].alignment
垂直居中sheet_to_client[column_d].font
Fontsheet_chatgpt[column_d].font
current_row[title]sheet_to_client[column_e]
titlesheet_to_client[column_e].border
设置边框sheet_chatgpt[column_e].border
设置边框sheet_to_client[column_e].alignment
垂直居中sheet_chatgpt[column_e].alignment
垂直居中sheet_to_client[column_e].font
Fontsheet_chatgpt[column_e].font
categorysheet_chatgpt[column_f]
categorysheet_to_client[column_f].border
设置边框sheet_chatgpt[column_f].border
设置边框sheet_to_client[column_f].alignment
垂直居中sheet_chatgpt[column_f].alignment
垂直居中sheet_to_client[column_f].font
Fontsheet_chatgpt[column_f].font
current_row[user_name]sheet_to_client[column_g]
user_namesheet_chatgpt[column_g]
user_namesheet_to_client[column_g].border
设置边框sheet_chatgpt[column_g].border
设置边框sheet_to_client[column_g].alignment
垂直居中sheet_chatgpt[column_g].alignment
垂直居中sheet_to_client[column_g].font
Fontsheet_chatgpt[column_g].font
current_row[content]sheet_to_client[column_h]
contentsheet_to_client[column_h].border
设置边框sheet_chatgpt[column_h].border
设置边框sheet_to_client[column_h].alignment
垂直居中sheet_chatgpt[column_h].alignment
垂直居中sheet_to_client[column_h].alignment
自动换行sheet_chatgpt[column_h].alignment
自动换行sheet_to_client[column_h].font
Fontsheet_chatgpt[column_h].font
str(row_idx)sheet_to_client[column_i]
Japanese:sheet_chatgpt[column_i]
contentelse:sheet_chatgpt[column_i]
H{row_idx})sheet_to_client[column_i].border
设置边框sheet_chatgpt[column_i].border
设置边框sheet_to_client[column_i].alignment
垂直居中sheet_chatgpt[column_i].alignment
垂直居中sheet_to_client[column_i].alignment
自动换行sheet_chatgpt[column_i].alignment
自动换行sheet_to_client[column_i].font
Fontsheet_chatgpt[column_i].font
str(row_idx)sheet_to_client[column_j]
ネガティブ)sheet_to_client[column_j].border
设置边框sheet_chatgpt[column_j].border
设置边框sheet_to_client[column_j].alignment
垂直居中sheet_chatgpt[column_j].alignment
垂直居中sheet_to_client[column_j].font
Fontsheet_chatgpt[column_j].font
str(row_idx)sheet_to_client[column_k]
)sheet_to_client[column_k].border
设置边框sheet_chatgpt[column_k].border
设置边框sheet_to_client[column_k].alignment
垂直居中sheet_chatgpt[column_k].alignment
str(row_idx)sheet_to_client[column_l]
)sheet_to_client[column_l].border
设置边框sheet_chatgpt[column_l].border
设置边框sheet_to_client[column_l].alignment
垂直居中sheet_chatgpt[column_l].alignment
str(row_idx)sheet_to_client[column_m]
)sheet_to_client[column_m].border
设置边框sheet_chatgpt[column_m].border
设置边框sheet_to_client[column_m].alignment
垂直居中sheet_chatgpt[column_m].alignment
str(row_idx)sheet_to_client[column_n]
)sheet_to_client[column_n].border
设置边框sheet_chatgpt[column_n].border
设置边框sheet_to_client[column_n].alignment
垂直居中sheet_chatgpt[column_n].alignment
str(row_idx)sheet_to_client[column_o]
)sheet_to_client[column_o].border
设置边框sheet_chatgpt[column_o].border
设置边框sheet_to_client[column_o].alignment
垂直居中sheet_chatgpt[column_o].alignment
str(row_idx)sheet_to_client[column_p]
)sheet_to_client[column_p].border
设置边框sheet_chatgpt[column_p].border
设置边框sheet_to_client[column_p].alignment
垂直居中sheet_chatgpt[column_p].alignment
str(row_idx)sheet_to_client[column_q]
)sheet_to_client[column_q].border
设置边框sheet_chatgpt[column_q].border
设置边框sheet_to_client[column_q].alignment
垂直居中sheet_chatgpt[column_q].alignment
str(row_idx)sheet_to_client[column_r]
)sheet_to_client[column_r].border
设置边框sheet_chatgpt[column_r].border
设置边框sheet_to_client[column_r].alignment
垂直居中sheet_chatgpt[column_r].alignment
str(row_idx)sheet_to_client[column_s]
)sheet_to_client[column_s].border
设置边框sheet_chatgpt[column_s].border
设置边框sheet_to_client[column_s].alignment
垂直居中sheet_chatgpt[column_s].alignment
str(row_idx)sheet_to_client[column_u]
保存修改后的Excel文件workbook_to_client.save(new_file_to_client_path)workbook_chatgpt.save(new_file_chartgtp_path)#
https://www.jianshu.com/p/75eb9342da59end_row
win32com.client.Dispatch(Excel.Application)excel_app.Visible
excel_app.Workbooks.Open(new_file_to_client_path)ws
wb.Activesheetws.PageSetup.PrintArea
f$A$2:$S${end_row}wb.Save()excel_app.Quit()sns_logger.info(f文件已创建并处理{new_file_to_client_path})sns_logger.info(f文件已创建并处理{new_file_chartgtp_path})except
log_level_args[conf_env]sns_logger.setLevel(log_level)sns_logger.info(
sys.argv[2]sns_logger.info(start_date:
util.is_valid_date(in_start_date):sns_logger.error(invalid
yyyy-mm-dd.format(in_start_date))exit()#
sys.argv[3]sns_logger.info(end_date:
util.is_valid_date(in_end_date):sns_logger.error(invalid
yyyy-mm-dd.format(in_end_date))exit()run(in_clients,
start_timesns_logger.info(run(%s,
in_end_date))sns_logger.info(f程序执行了
作为专业的SEO优化服务提供商,我们致力于通过科学、系统的搜索引擎优化策略,帮助企业在百度、Google等搜索引擎中获得更高的排名和流量。我们的服务涵盖网站结构优化、内容优化、技术SEO和链接建设等多个维度。
| 服务项目 | 基础套餐 | 标准套餐 | 高级定制 |
|---|---|---|---|
| 关键词优化数量 | 10-20个核心词 | 30-50个核心词+长尾词 | 80-150个全方位覆盖 |
| 内容优化 | 基础页面优化 | 全站内容优化+每月5篇原创 | 个性化内容策略+每月15篇原创 |
| 技术SEO | 基本技术检查 | 全面技术优化+移动适配 | 深度技术重构+性能优化 |
| 外链建设 | 每月5-10条 | 每月20-30条高质量外链 | 每月50+条多渠道外链 |
| 数据报告 | 月度基础报告 | 双周详细报告+分析 | 每周深度报告+策略调整 |
| 效果保障 | 3-6个月见效 | 2-4个月见效 | 1-3个月快速见效 |
我们的SEO优化服务遵循科学严谨的流程,确保每一步都基于数据分析和行业最佳实践:
全面检测网站技术问题、内容质量、竞争对手情况,制定个性化优化方案。
基于用户搜索意图和商业目标,制定全面的关键词矩阵和布局策略。
解决网站技术问题,优化网站结构,提升页面速度和移动端体验。
创作高质量原创内容,优化现有页面,建立内容更新机制。
获取高质量外部链接,建立品牌在线影响力,提升网站权威度。
持续监控排名、流量和转化数据,根据效果调整优化策略。
基于我们服务的客户数据统计,平均优化效果如下:
我们坚信,真正的SEO优化不仅仅是追求排名,而是通过提供优质内容、优化用户体验、建立网站权威,最终实现可持续的业务增长。我们的目标是与客户建立长期合作关系,共同成长。
Demand feedback