ein erster Test #MacBookAir
This commit is contained in:
commit
56264a6cd6
1 changed files with 21 additions and 0 deletions
21
py2EX.py
Normal file
21
py2EX.py
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
from openpyxl import Workbook
|
||||
|
||||
# 1. Ein neues Workbook erstellen
|
||||
workbook = Workbook()
|
||||
|
||||
# 2. Das aktive Arbeitsblatt auswählen
|
||||
sheet = workbook.active
|
||||
|
||||
# 3. Namen des Arbeitsblattes ändern (optional)
|
||||
sheet.title = "Meine Tabelle"
|
||||
|
||||
# 4. Daten in die Tabelle schreiben
|
||||
sheet["A1"] = "Name"
|
||||
sheet["B1"] = "Alter"
|
||||
sheet["A2"] = "Max"
|
||||
sheet["B2"] = 25
|
||||
sheet["A3"] = "Anna"
|
||||
sheet["B3"] = 30
|
||||
|
||||
# 5. Die Datei speichern
|
||||
workbook.save("Beispiel.xlsx")
|
||||
Loading…
Add table
Add a link
Reference in a new issue