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