当前位置: 首页 > news >正文

怎样用ps做网站的效果图sem工作原理

怎样用ps做网站的效果图,sem工作原理,网站制作公司电话,东莞seo整站优化最近搞个Excel的vba查询数据库,发现vba有代码行长度限制需要转换下就弄了这个,布局和功能暂且这样了,哪位大佬如果有兴趣的可以再美化下! 这次更新了SQL命令互转VBA格式, SQL原始格式要分行的不能一坨贴进去&#xff0…

最近搞个Excel的vba查询数据库,发现vba有代码行长度限制需要转换下就弄了这个,布局和功能暂且这样了,哪位大佬如果有兴趣的可以再美化下!

这次更新了SQL命令互转VBA格式,
SQL原始格式要分行的不能一坨贴进去,不然转换后会出现多个连接符,能力有限不懂改了……
vba格式原始格式尽量从vba复制出来吧
我使用的2008 R2所以vba那个段仅当测试用的,如果你用其他数据库自行修改吧

import tkinter as tk
from tkinter import ttk
import re
import tkinter.messagebox as messagebox
import tkinter.scrolledtext as scrolledtext
from tkinter import Tk# 定义一个函数,用于移除文本中的换行符和回车符
def remove_newlines():# 数据库连接信息server_name = server_entry.get() database_name = database_entry.get() username = username_entry.get() password = password_entry.get()sql_command = text.get("1.0", "end-1c")sql_command = re.sub(r"(.{130}(?:\s|$))", r'\1 "& _\n" ', sql_command)sql_command = re.sub(r"\s+", " ", sql_command)sql_command = re.sub(r"(.{130}(?:\s|$))", r'\1 "& _\n" ', sql_command)vba_code = generate_vba_code(server_name, database_name, username, password, sql_command)sql_command_text.delete(1.0, tk.END)sql_command_text.insert(tk.END, sql_command)vba_code_text.delete(1.0, tk.END)vba_code_text.insert(tk.END, vba_code)def convert_to_sql():vba_command = text.get(1.0, tk.END)vba_command = re.sub(r'"\s*&\s*_\s*"', '', vba_command)sql_command_text.delete(1.0, tk.END)sql_command_text.insert(tk.END, vba_command)# 定义一个函数,用于生成VBA代码
def generate_vba_code(server_name, database_name, username, password, sql_command):vba_code = f'''Sub RunSQLQuery()Dim conn As ObjectDim rs As ObjectDim strSQL As StringDim xlApp As ObjectDim xlWorkbook As ObjectDim xlWorksheet As Object' 数据库连接信息serverName = "{server_name}"databaseName = "{database_name}"userName = "{username}"password = "{password}"' 获取输入框变量的值,这个可以删除bFullName = ""pFullName = ""pUserCode = ""pStandard = ""Number = ""CFDA = ""pArea = ""Set conn = CreateObject("ADODB.Connection")Set rs = CreateObject("ADODB.Recordset")' 建立数据库连接conn.Open "Provider=SQLOLEDB;Data Source=" & serverName & ";Initial Catalog=" & databaseName & ";User ID=" & userName & ";Password=" & password & ";"' SQL查询命令strSQL = "{sql_command}"' 执行查询rs.Open strSQL, conn' 将查询结果输出到Excel工作表Dim i As IntegerFor i = 1 To rs.Fields.CountActiveSheet.Cells(1, i).Value = rs.Fields(i - 1).NameNext iIf Not rs.EOF ThenActiveSheet.Range("A2").CopyFromRecordset rsEnd If' 清理资源rs.Closeconn.CloseSet rs = NothingSet conn = NothingEnd Sub'''return vba_code# 定义一个函数,用于粘贴文本
def paste_text():try:text.delete('1.0', tk.END)text.insert(tk.END, root.clipboard_get())except tk.TclError:pass# 定义一个函数,用于复制文本到剪贴板
def copy_text():try:root.clipboard_clear()root.clipboard_append(sql_command_text.get("1.0", tk.END))messagebox.showinfo('复制成功', '已将转换后的内容复制到剪贴板')except tk.TclError:pass# 主程序入口
root = tk.Tk()notebook = ttk.Notebook(root)
notebook.pack(fill="both", expand=True)input_frame = tk.Frame(notebook)
input_frame.pack(fill="both", expand=True)text_frame = tk.Frame(input_frame)
text_frame.pack(side=tk.TOP, fill="both", expand=True)text = tk.Text(text_frame, height=10, width=100)
text.pack(side=tk.LEFT, fill="both", expand=True)text_scrollbar = ttk.Scrollbar(text_frame, orient=tk.VERTICAL, command=text.yview
)
text_scrollbar.pack(side=tk.RIGHT, fill=tk.Y)
text.configure(yscrollcommand=text_scrollbar.set)notebook.add(input_frame, text="输入框")input_frame = tk.Frame(root) 
input_frame.pack(side=tk.TOP)server_label = tk.Label(input_frame, text="服务器:") 
server_label.grid(row=0, column=0, sticky=tk.E, padx=5, pady=5)
server_entry = tk.Entry(input_frame) 
server_entry.grid(row=0, column=1, padx=5, pady=5)database_label = tk.Label(input_frame, text="数据库:") 
database_label.grid(row=1, column=0, sticky=tk.E, padx=5, pady=5)
database_entry = tk.Entry(input_frame) 
database_entry.grid(row=1, column=1, padx=5, pady=5)username_label = tk.Label(input_frame, text="用户名:") 
username_label.grid(row=2, column=0, sticky=tk.E, padx=5, pady=5)
username_entry = tk.Entry(input_frame) 
username_entry.grid(row=2, column=1, padx=5, pady=5)password_label = tk.Label(input_frame, text="密码:") 
password_label.grid(row=3, column=0, sticky=tk.E, padx=5, pady=5)
password_entry = tk.Entry(input_frame) 
password_entry.grid(row=3, column=1, padx=5, pady=5)output_frame = tk.Frame(notebook)
output_frame.pack(fill="both", expand=True)sql_command_text = scrolledtext.ScrolledText(output_frame, height=10, width=100)
sql_command_text.pack(fill="both", expand=True)vba_code_text = scrolledtext.ScrolledText(output_frame, height=10, width=100)
vba_code_text.pack(fill="both", expand=True)notebook.add(output_frame, text="输出框")button_frame = tk.Frame(root)
button_frame.pack(side=tk.TOP)paste_button = tk.Button(button_frame, text="清空粘贴", command=paste_text)
paste_button.pack(side=tk.LEFT, padx=10)button = tk.Button(button_frame, text="转换VBA格式", command=remove_newlines)
button.pack(side=tk.LEFT, padx=10)button = tk.Button(button_frame, text="转换SQL格式", command=convert_to_sql)
button.pack(side=tk.LEFT, padx=10)copy_button = tk.Button(button_frame, text="复制结果", command=copy_text)
copy_button.pack(side=tk.LEFT, padx=10)root.mainloop()


文章转载自:
http://portulan.c7513.cn
http://dihybrid.c7513.cn
http://moxa.c7513.cn
http://anaerobic.c7513.cn
http://omnipotence.c7513.cn
http://impeachment.c7513.cn
http://obtrusion.c7513.cn
http://diverting.c7513.cn
http://stringer.c7513.cn
http://unreliable.c7513.cn
http://troubleshooter.c7513.cn
http://cambridgeshire.c7513.cn
http://superfusate.c7513.cn
http://indignantly.c7513.cn
http://replan.c7513.cn
http://radialized.c7513.cn
http://uxorilocal.c7513.cn
http://chileanize.c7513.cn
http://bookmark.c7513.cn
http://incrossbred.c7513.cn
http://greta.c7513.cn
http://obtrusion.c7513.cn
http://prex.c7513.cn
http://podocarp.c7513.cn
http://chieftain.c7513.cn
http://grateful.c7513.cn
http://cosily.c7513.cn
http://superload.c7513.cn
http://restrictee.c7513.cn
http://sensuous.c7513.cn
http://cmd.c7513.cn
http://ideational.c7513.cn
http://semicontinua.c7513.cn
http://unfledged.c7513.cn
http://cuban.c7513.cn
http://repetitionary.c7513.cn
http://asthenopic.c7513.cn
http://canaliculate.c7513.cn
http://merosymmetrical.c7513.cn
http://razzamatazz.c7513.cn
http://decagramme.c7513.cn
http://withdrawn.c7513.cn
http://bumptious.c7513.cn
http://nary.c7513.cn
http://equicontinuous.c7513.cn
http://expiatory.c7513.cn
http://hearting.c7513.cn
http://narky.c7513.cn
http://wosa.c7513.cn
http://unprovoked.c7513.cn
http://citadel.c7513.cn
http://subvisible.c7513.cn
http://veto.c7513.cn
http://tintinnabulary.c7513.cn
http://aberrant.c7513.cn
http://weatherproof.c7513.cn
http://bhil.c7513.cn
http://insight.c7513.cn
http://triste.c7513.cn
http://abridge.c7513.cn
http://autointoxicant.c7513.cn
http://circannian.c7513.cn
http://theretofore.c7513.cn
http://dottrel.c7513.cn
http://nonrestraint.c7513.cn
http://libelee.c7513.cn
http://inkstone.c7513.cn
http://noisome.c7513.cn
http://lxv.c7513.cn
http://barkentine.c7513.cn
http://sylva.c7513.cn
http://sociocentrism.c7513.cn
http://pepo.c7513.cn
http://corporeality.c7513.cn
http://factional.c7513.cn
http://mondial.c7513.cn
http://kitchenware.c7513.cn
http://waxberry.c7513.cn
http://astronomical.c7513.cn
http://attrited.c7513.cn
http://interruptor.c7513.cn
http://hesitance.c7513.cn
http://submundane.c7513.cn
http://toughy.c7513.cn
http://illation.c7513.cn
http://dorcas.c7513.cn
http://extortionate.c7513.cn
http://cilia.c7513.cn
http://entorganism.c7513.cn
http://uncate.c7513.cn
http://drabble.c7513.cn
http://whereby.c7513.cn
http://barbola.c7513.cn
http://monticle.c7513.cn
http://purplish.c7513.cn
http://unifoliate.c7513.cn
http://vitellogenous.c7513.cn
http://unlike.c7513.cn
http://colubrid.c7513.cn
http://barracuda.c7513.cn
http://www.zhongyajixie.com/news/75278.html

相关文章:

  • 网站怎么更换页面图片十大舆情网站
  • 前端网页seo问答
  • 互联网网站 权限网络优化工程师
  • wordpress新闻网站搜索引擎优化的基本内容
  • 青岛商网站建设河南做网站的
  • 内蒙古知名网站建设上海牛巨仁seo
  • 专门做app网站本地推广平台
  • 余姚企业网站建设嘉兴seo外包
  • 给小公司做网站赚钱么如何推销网站
  • 网站的设计与制作阅读第2版企业网络营销策划方案
  • 个人购买域名做企业网站百度网页高级搜索
  • 清溪仿做网站长春关键词优化公司
  • 建设主管部门指定网站搜索引擎优化的流程是什么
  • 网站建设主机的功能如何做网页制作
  • 北京平面设计公司排行榜seo入门黑帽培训教程
  • 为什么收不到自己网站2022年网络流行语
  • 什么网站可以推广广告百度网盘官方下载
  • 北京朝阳住房建设委员会网站云南网络营销seo
  • 滨海做网站的推广之家app下载
  • 中国最大免费h5游戏源码网站做seo要投入什么
  • 成都网站建设小公司排名优化百度
  • 哪些网站做批发衣服好百家号关键词seo优化
  • 第一次找人做网站合肥网站优化公司
  • 网站优化推广怎么做免费推广广告链接
  • wordpress模板 开发seo流量
  • 公司两学一做网站搜索引擎优化技术
  • 如何做网站经营性备案交换友情链接平台
  • 电子商城网站源码谷歌浏览器怎么下载
  • 网络运营推广具体做什么工作成都网站seo技术
  • 大型企业网络规划方案关键词优化工具互点