劉任昌python import openpyxl 處理EXCEL

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

留言

  1. https://weizhezhantvsdexcr.blogspot.com/2023/05/python-import-openpyxl-excel-5-18-2023.html

    回覆刪除
  2. https://kff0787.blogspot.com/2023/05/python-import-openpyxl-excel.html

    回覆刪除
  3. https://hung927.blogspot.com/2023/05/preborder5px-pink-solid-import-openpyxl.html

    回覆刪除
  4. https://tsaihuajaker.blogspot.com/2023/05/python-import-openpyxl-excel.html

    回覆刪除
  5. https://dannyyeh13.blogspot.com/2023/05/python-import-openpyxl-excel.html

    回覆刪除
  6. https://tonydongdo.blogspot.com/2023/05/python-import-openpyxl-excel.html

    回覆刪除
  7. https://d10917206.blogspot.com/2023/05/python-import-openpyxl-excel.html

    回覆刪除
  8. https://d10917203.blogspot.com/2023/05/python-import-openpyxl-excel.html

    回覆刪除
  9. https://remonti0119.blogspot.com/2023/05/python-import-openpyxl-excel.html

    回覆刪除
  10. https://hsiehhuihsiang.blogspot.com/2023/05/519-python-openpyxl.html

    回覆刪除
  11. https://xiang4427.blogspot.com/2023/05/ptthonexcel.html

    回覆刪除
  12. https://kingmonkey2020.blogspot.com/2023/05/pythonexcel.html

    回覆刪除
  13. https://kenyeh123.blogspot.com/2023/05/python-import-openpyxl-excel.html

    回覆刪除
  14. https://zirujiang0130.blogspot.com/2023/05/python-import-openpyxl-excel.html

    回覆刪除
  15. https://tsaihuajaker.blogspot.com/2023/05/python-import-openpyxl-excel_25.html

    回覆刪除
  16. https://weishinten.blogspot.com/2023/05/python-import-openpyxl-excel.html

    回覆刪除
  17. 補交https://d10917350.blogspot.com/2023/05/python-import-openpyxl-excel.html

    回覆刪除
  18. https://ruruuu23.blogspot.com/2023/06/blog-post.html

    回覆刪除

張貼留言

這個網誌中的熱門文章

D123456劉任昌期末考

劉任昌美國2010年5月6日flash crash閃崩事件

2025年3月7日福斯汽車與遊戲驛站軋工事件