# -*-coding:utf-8-*-
from openpyxl import load_workbook
from openpyxl_image_loader import SheetImageLoader
def main():
filepath = './excel/sample.xlsx'
load_wb = load_workbook(filepath, data_only=True)
for sheet_name in load_wb.sheetnames:
sheet = load_wb[sheet_name]
image_loader = SheetImageLoader(sheet)
# image = image_loader.get('C3')
# image.show()
print(sheet.max_row, sheet.max_column)
for column in range(sheet.max_column):
column = chr(ord('A') + column)
for row in range(sheet.max_row):
cell_id = '{0}{1}'.format(column, row)
print(cell_id)
if image_loader.image_in(cell_id):
print(cell_id, '->', image_loader.image_in(cell_id))
if __name__ == '__main__':
main()
2021년 9월 29일 수요일
excel에 첨부된 이미지 추출.
피드 구독하기:
댓글 (Atom)
docker redmine 설치
docker-composer.yml version: '3.1' services: redmine: image: redmine restart: always container_na...
-
용량이 큰 파일 업로드 시 net::ERR_CONNECTION_RESET 오류 발생할 경우. http_server = tornado.httpserver.HTTPServer(app, max_buffer_size=10485760000) upload_for...
-
# !-*- coding:utf-8 -*- import os import sys from PyQt5 import uic from PyQt5.QtCore import Qt from PyQt5.QtWidgets import QDialog , QAppl...
-
class Program { static void Main(String[] args) { string zipPath = "..."; string extractPath = Path.G...
댓글 없음:
댓글 쓰기