Page 1 of 1

Problem with images

Posted: Fri Jan 17, 2014 7:49 pm
by PascalD
I am trying to add an images to a sheet while migrating a project from V1 to V5.

I used the following line to add the image:

Code: Select all

  _Image := _XLS[0].Drawing.InsertImage(_FileName, j, k + 1, 0, 0, 1);
The code freezes in TXLSDrawing.DoInsertImage in the following loop

Code: Select all

  while (AWidth - FColumns[ACol].PixelWidth) >= 0 do begin
    Dec(AWidth,FColumns[ACol].PixelWidth);
    Inc(ACol);
  end;
because FColumns[ACol].PixelWidth is always zero.

Am I missing something ?

Thanks,

Pascal

Delphi XE5 with XLSReadWrite version 5.20.12

Re: Problem with images

Posted: Tue Jan 21, 2014 2:41 pm
by larsa
Hello

Please try with the latest update, 5.20.13

Re: Problem with images

Posted: Thu Jan 30, 2014 4:10 pm
by PascalD
It works fine now.

Thanks

Re: Problem with images

Posted: Fri Feb 07, 2014 9:22 pm
by rjvanvliet
Hello,

Latest version gives me problems again inserting images! Previous version it works well.

Regards,
RJ

Re: Problem with images

Posted: Mon Feb 10, 2014 3:39 pm
by flls
When I insert an image does not appear in TXLSSpreadSheet component. When I open the spreadsheet in Excel, the following text appears in place of the image:
Unable to display this image at the time.
The same problem occurs with "Advanced_Invoice" sample that came with the component.


XLSSpreadSheet V2.00.05
SLXReadWriteII V5.20.14a

Re: Problem with images

Posted: Mon Feb 10, 2014 4:47 pm
by larsa
Hello

Please try the latest update.

Re: Problem with images

Posted: Mon Feb 10, 2014 5:22 pm
by flls
larsa wrote:Hello

Please try the latest update.
Thank you, the picture appeared in the new version, but it is not anchored in the cell. When we roll the screen in the component, the image is always above the screen in the same position. When I open the spreadsheet in Excel, the image is anchored properly and scrolls along the cell.

Re: Problem with images

Posted: Thu Feb 13, 2014 8:57 am
by larsa
Hello

It seems that you not is using the latest update. Please make sure that you don't have any old version lying around. Also, delete all DCU:s as delphi may use these.

Re: Problem with images

Posted: Fri Feb 28, 2014 1:22 pm
by flls
I have the latest version, but the image always appears above the TXLSSpreadSheet component, in the same position. Is it a problem in my code for displaying the image? I'm doing the following:

Code: Select all

procedure TPlanAnuncios.LoadPic(const aXLS: TXLSReadWriteII5; const cl, rw, ts: Integer; const FileName: String);
  var
    aSht    : TXLSWorksheet;
    Image   : TXLSDrawingImage;
  begin
    aSht              := aXLS.Sheets[ts];
    Image             := aSht.Drawing.InsertImage(Filename, cl, rw, 0.05, 0.1, 0.69336);
    Image.Positioning := TDrwOptImagePositioning.doipMoveButDoNotSize;
  end;

Re: Problem with images

Posted: Wed Mar 05, 2014 3:54 pm
by larsa
Hello

Is the image not scrolled? There is a error when scrolling with the mouse wheel. This will be fixed in the next update. Otherwise I can't find any errors in your code.

Re: Problem with images

Posted: Wed Mar 05, 2014 5:39 pm
by flls
This is exactly the problem occurs when I use the mouse wheel, there was no attempt to do so before. Thanks, I'll be awaiting the next version with the fix.