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
- Linux
- flutter
- 다이어트
- ASP
- 함수
- sqlite
- PER
- 날짜
- GIT
- MySQL
- MS-SQL
- PyQt
- 맛집
- javascript
- ubuntu
- IOS
- urllib
- mssql
- python
- Excel
- 리눅스
- port
- pandas
- Unity
- PyQt5
- tensorflow
- 유니티
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