从ppt中获取文本框内容及位置信息,并写入到数据库中
import pymysql
import sys
import re
from pptx import Presentation
from pptx.util import Inches
from pptx.chart.data import ChartData
from pptx.enum.chart import XL_TICK_MARK
from pptx.util import Pt
from pptx.dml.color import RGBColor
from pptx.enum.chart import XL_DATA_LABEL_POSITION
from pptx.enum.chart import XL_LEGEND_POSITION
from pptx.enum.chart import XL_CHART_TYPE
from pptx.enum.chart import XL_MARKER_STYLE
from pptx.enum.chart import XL_TICK_LABEL_POSITION
from pptx import Presentation
from pptx.enum.text import PP_ALIGN
def fn_ppt_get_object_text(mydb,filePath):
#mydb = pymysql.connect("192.168.80.224","root","123","baoxian",port=3306,charset='utf8' )#192.168.80.224
#mydb.set_character_set('utf8')
mycursor = mydb.cursor()
mycursor.execute('SET CHARACTER SET utf8;')
mycursor.execute('SET NAMES utf8