jooheesuh1239117
@jooheesuh1239117
Reviews Written
2
Average Rating
5.0
Posts
Q&A
์ฟ ํก list ์์ฑ ์ค
import openpyxl import random wb = openpyxl.Workbook() ws= wb.active ws.title = 'data' item_dic = {'๊ธฐ๊ณ์ ํค๋ณด๋' : 120000, '๊ฒ์ด๋ฐ ๋ง์ฐ์ค' : 40000, '32์ธ์น ๋ชจ๋ํฐ' : 350000, '๋ง์ฐ์ค ํจ๋' : 20000 } data = random.randint(5,10) ws['A1'] = '์๋ฒ'; ws['B1'] = '์ ํ๋ช '; ws['C1'] = '๊ฐ๊ฒฉ' ws['D1'] = '์๋'; ws['E1'] = 'ํฉ๊ณ' for i in range(data): item = random.choice(list(item_dic.keys())) qty = random.randint(1,5) ws.append([i+1, item, item_dic.get(item), qty, f'=C{i+2}*D{i+2}']) ws = wb.save('11๋ฒ๊ฐ.xlsx') ์ด๋ ๊ฒ ์์ฑํด์ ํด๊ฒฐํ์์ต๋๋ค. ํน์ ๋ ์ค์ผ ์ ์๋ ๋ถ๋ถ์ด ์์๊น์?
- Likes
- 1
- Comments
- 1
- Viewcount
- 445
Q&A
pip ์ค์น ๋ถ๊ฐ
https://puleugo.tistory.com/18์ ๋ฐฉ๋ฒ์ผ๋ก ํด๊ฒฐํ์์ต๋๋ค.
- Likes
- 1
- Comments
- 3
- Viewcount
- 768




