请教吹水佬版主
https://bbs.bccn.net/viewthread.php?tid=477910&highlight=excel%2B%CD%BC%C6%AC这个帖子您的代码如下
** 导出EXCEL图片
cPath = "C:\TEMP\"
cXLS = cPath + "test.xls"
oExcel = CREATEOBJECT("Excel.Application")
oExcel.WorkBooks.Open(cXLS)
FOR EACH oShape IN oExcel.ActiveSheet.Shapes
cJPG = cPath + JUSTSTEM(cXLS) + "_" + STRTRAN(oShape.TopLeftCell.Address,"$","") + ".jpg"
? "导出:" + cJPG
oShape.CopyPicture
oChart = oExcel.ActiveSheet.ChartObjects.Add(0,0,oShape.Width,oShape.Height).Chart
oChart.Paste
oChart.Export(cJPG, "JPG")
oChart.Parent.Delete
ENDFOR
? "导出完毕"
oExcel.ActiveWorkBook.Saved = .T.
oExcel.WorkBooks.Close
oExcel.Quit
有些代码看不太懂,执行后出现如图错误?
请版主指教,谢谢