C#EPPlus(或OpenXml)将Excel形状保存为图像
我想从Excel文件中提取所有可视对象(现在是图像和形状) 使用图片很容易,因为它们具有图像属性。 是否可以将形状保存为图像文件C#EPPlus(或OpenXml)将Excel形状保存为图像,c#,excel,openxml,epplus,C#,Excel,Openxml,Epplus,我想从Excel文件中提取所有可视对象(现在是图像和形状) 使用图片很容易,因为它们具有图像属性。 是否可以将形状保存为图像文件 int i = 0; foreach (ExcelDrawing item in workSheet.Drawings) { i++; var pic = item as ExcelPicture; var shp = (item as ExcelShape); pic?.Image?.Save($@"C:\MyFile{i}.jpg
int i = 0;
foreach (ExcelDrawing item in workSheet.Drawings)
{
i++;
var pic = item as ExcelPicture;
var shp = (item as ExcelShape);
pic?.Image?.Save($@"C:\MyFile{i}.jpg");
if (shp != null) {
// how can I save the shape?
}
}