When inserting pictures into cells, the pictures do not keep their original size, but is reduced to height: 100% width: 55%. How can I make sure that the original size is used?
I have sent an example Excel sheet where you can see the result (Subject: Image size is distortede when inserted)
I use the following code to insert the picture:
Private Sub InsertPicture(ByVal RowNumber As Integer, ByVal ColumnNumber As Integer, ByVal Image As String, Optional ByVal IncrementLeft As Integer = 0, Optional ByVal IncrementTop As Integer = 0)
Try
Dim Range As Aspose.Excel.Range
Dim Picture As Aspose.Excel.Picture
Dim PicturePos As Integer
PicturePos = WorkBookSheet.Pictures.Add(RowNumber, ColumnNumber, Image)
Picture = WorkBookSheet.Pictures(PicturePos)
If IncrementLeft <> 0 Then
Picture.Left = IncrementLeft
End If
If IncrementTop <> 0 Then
Picture.Top = IncrementTop
End If
Picture = Nothing
Catch ex As Exception
Me.Destroy()
Throw New DanskeException(“RES_EXCELPRINTERROR”, ex)
End Try
End Sub
Hi,
I will check this issue right now.