25.05.2007, 15:02 | #14 |
Участник
|
Так будет правильно:
Код: Name DataType Subtype Length recCompanyInf Record Company Information xlApp Automation 'Microsoft Excel 11.0 Object Library'.Application xlSheet Automation 'Microsoft Excel 11.0 Object Library'.Worksheet xlBook Automation 'Microsoft Excel 11.0 Object Library'.Workbook CREATE(xlApp); xlBook := xlApp.Workbooks.Add; xlSheet := xlBook.Worksheets.Item(1); xlSheet.Name := 'test'; recCompanyInf.FINDFIRST; recCompanyInf.CALCFIELDS(Picture); recCompanyInf.Picture.EXPORT('c:\temp.bmp'); xlSheet.Shapes.AddPicture('c:\temp.bmp', 1, 1, 0 ,0, 0, 0); xlSheet.Shapes.Item(1).ScaleHeight(1, 1); //"Реанимируем" оригинальный размер картинки xlSheet.Shapes.Item(1).ScaleWidth(1, 1); Report - OnPostReport() xlApp.Visible(TRUE); xlApp.UserControl(TRUE); |
|