I'm writting code to Get All Images including Shapes from Excel (.xls and xlsx) using C# and NPOI(ver 2.2.1) Library. The purpose is to get all images including shapes from selected Excel file and then save it to specified directory.
After a while trial-error and browse any references, i'm able to get all Image from Excel using this code (I put code for read xls format),
But, i can't get the Shapes in Excel with that Code, so i'm trying to find any other method and finally i found some code that can get List of Images and Shapes that exist in Sheet of Excel,
here the snippet of code (also code for read xls format file),
And when i put breakpoint on foreach statement and watch, it's show the list of Images and Shapes that i need to Save.
With that code, I'm able to Get and Save its Image data (HSSFPicture), But I can't find any Method or Properties for Converting or Saving Shape Data (HSSFSimpleShape) to Image.
My Question is, How can I Convert this Shape data to Image, and saving it to specified directory? Is there something wrong with the code that I write? Or maybe there is another solution (using NPOI of course) that i can use to get Shapes from Excel (xls or xlsx) file?