Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | |
| 7 | 8 | 9 | 10 | 11 | 12 | 13 |
| 14 | 15 | 16 | 17 | 18 | 19 | 20 |
| 21 | 22 | 23 | 24 | 25 | 26 | 27 |
| 28 | 29 | 30 |
Tags
- swift
- 유니티
- 라즈베리파이
- node.js
- flutter
- PyQt5
- urllib
- Excel
- sqlite
- PER
- port
- 함수
- ASP
- IOS
- PyQt
- GIT
- Linux
- python
- mssql
- pandas
- ubuntu
- Unity
- MS-SQL
- 다이어트
- tensorflow
- 날짜
- 리눅스
- javascript
- 맛집
- MySQL
Archives
아미(아름다운미소)
암호화엑셀을 CSV로 변경 본문
import win32com.client as win32
import os
excel = win32.Dispatch("Excel.Application")
excel.Visible = False
excel.DisplayAlerts = False
folder = r"C:\excel_folder"
try:
for file in os.listdir(folder):
if file.endswith(".xlsx"):
xlsx = os.path.join(folder, file)
wb = excel.Workbooks.Open(xlsx)
for sheet in wb.Worksheets:
csv = os.path.join(
folder,
f"{file.replace('.xlsx','')}_{sheet.Name}.csv"
)
sheet.SaveAs(csv, FileFormat=62)
wb.Close(False)
finally:
excel.Quit() # ⭐ 에러 나도 엑셀 강제 종료
Comments