Hi Nipun,
1) How can I set border width = 0?
You can set width by using the following code snippets.
IPictureShape pic = mySheet.Pictures.AddPicture("Bluehills.jpg");
//Setting the height and width of the picture
pic.Height = 400;
pic.Width = 400
2) How do I align image vertically and horizontally?
You can rotate the picture by using the following code snippets.
//Rotate.
pic.Picture.RotateFlip(System.Drawing.RotateFlipType.Rotate270FlipY);
3) How can I give the exact position [top and left pixels] for an image?
You can give exact position of the picture by using the following code snippets.
//Position of the picture
pic.Left = 400;
pic.Top = 250;
4) Is there any way to define background image for some cell range?
You can define background image for some cell range by specifying the top row, left column, bottom row and right column.
IPictureShape pic = mySheet.Pictures.AddPicture(1,1,5,6,"Bluehills.jpg");
Here is the sample for your reference:
Picture_Scale.zipPlease take a look at the sample above and let me know if you have any other questions.
Thanks,
Melba