import openpyxl #劉任昌輸入import openpyxl處理EXCEL的函式庫
book = openpyxl.load_workbook(r'wb.xlsx') #開啟EXCEL工作簿wb.xlsx
print("1. 列出所有工作表名稱")
sheetNames=book.sheetnames #所有工作表的集合
for name in sheetNames:
print(name)
print("2. 針對特定工作表, 列出前面數列")
#sheet = book["python"]
#for row in sheet.iter_rows(min_row=1, max_row=3, min_col=1, max_col=5, values_only=True):
# print(row)
print("3. 列出工作表所有內容")
#sheet["F1"], sheet["G1"], sheet["H1"], sheet["I1"]="波段H","波段L","部位","損益"
#sheet["F2"], sheet["G2"], sheet["H2"], sheet["I2"]=sheet["C2"].value, sheet["D2"].value, 0, 0
#for row in sheet.iter_rows(min_row=1, max_row=3, min_col=1, max_col=9, values_only=True):
# print(row)
#book.save()

from tkinter import *
import pygame
root = Tk()
root.title("劉任昌")
root.geometry("500x400")
pygame.mixer.init()
def play():
pygame.mixer.music.load('mixkit-tech-house-vibes-130.mp3')
pygame.mixer.music.play(loops=0)
def stop():
pygame.mixer.music.stop()
my_button = Button(root, text=("演奏"), command=play)
my_button.pack(pady=20)
stop_button = Button(root, text="停止", command=stop)
stop_button.pack(pady=20)
root.mainloop()
# www.pygame.org
#pip install -U pygame==2.4.0 --user
https://weizhezhantvsdexcr.blogspot.com/2023/05/python-import-openpyxl-excel-5-18-2023.html
回覆刪除https://kff0787.blogspot.com/2023/05/python-import-openpyxl-excel.html
回覆刪除https://hung927.blogspot.com/2023/05/preborder5px-pink-solid-import-openpyxl.html
回覆刪除https://tsaihuajaker.blogspot.com/2023/05/python-import-openpyxl-excel.html
回覆刪除https://dannyyeh13.blogspot.com/2023/05/python-import-openpyxl-excel.html
回覆刪除https://tonydongdo.blogspot.com/2023/05/python-import-openpyxl-excel.html
回覆刪除https://d10917206.blogspot.com/2023/05/python-import-openpyxl-excel.html
回覆刪除https://d10917203.blogspot.com/2023/05/python-import-openpyxl-excel.html
回覆刪除https://remonti0119.blogspot.com/2023/05/python-import-openpyxl-excel.html
回覆刪除https://hsiehhuihsiang.blogspot.com/2023/05/519-python-openpyxl.html
回覆刪除https://xiang4427.blogspot.com/2023/05/ptthonexcel.html
回覆刪除https://kingmonkey2020.blogspot.com/2023/05/pythonexcel.html
回覆刪除https://kenyeh123.blogspot.com/2023/05/python-import-openpyxl-excel.html
回覆刪除https://zirujiang0130.blogspot.com/2023/05/python-import-openpyxl-excel.html
回覆刪除https://tsaihuajaker.blogspot.com/2023/05/python-import-openpyxl-excel_25.html
回覆刪除https://weishinten.blogspot.com/2023/05/python-import-openpyxl-excel.html
回覆刪除補交https://d10917350.blogspot.com/2023/05/python-import-openpyxl-excel.html
回覆刪除https://ruruuu23.blogspot.com/2023/06/blog-post.html
回覆刪除