GetImagesInColumn
(
Worksheet oWorksheet,
String sImageColumnName
)
{
Debug.Assert(oWorksheet != null);
Debug.Assert( !String.IsNullOrEmpty(sImageColumnName) );
Dictionary<String, Microsoft.Office.Interop.Excel.Shape>
oImagesInColumn =
new Dictionary<String, Microsoft.Office.Interop.Excel.Shape>();
foreach (Microsoft.Office.Interop.Excel.Shape oShape in
oWorksheet.Shapes)
{
// The names of the images added by this class start with the image
// column name.
String sShapeName = oShape.Name;
if ( sShapeName != null &&
sShapeName.StartsWith(sImageColumnName) )
{
oImagesInColumn[sShapeName] = oShape;
}
}
return (oImagesInColumn);
}