Export Picture to Excel with Auto-scale

KeeperRU
Member Posts: 58
Hi,
I try to use something like this:
xlSheet.Shapes.AddPicture(FilePathAndName, 1, 1, 20, 20, 100, 100);
but problem with 2 last parameters, because my pictures have different size.
Which method may i use to export pictures without declare width and height?
(original size)
I try to use something like this:
xlSheet.Shapes.AddPicture(FilePathAndName, 1, 1, 20, 20, 100, 100);
but problem with 2 last parameters, because my pictures have different size.
Which method may i use to export pictures without declare width and height?
(original size)
0
Comments
-
Or how can I get image size (in the BLOB field)?
to put it in function:
xlSheet.Shapes.AddPicture(FilePathAndName, 1, 1, 20, 20, WIDTH, HEIGHT)0 -
Can u plz explain how u flowed the image in a Report's excel, from the start0
-
That simple:
ItemPicture.CALCFIELDS(Picture); IF ItemPicture.Picture.HASVALUE THEN BEGIN FilePath := ENVIRON('TEMP') + '\IMG.bmp'; ItemPicture.Picture.EXPORT(FilePath); XlsBuf.ExportPicture(FilePath, 1, 1, 0, 493, 370, 250); END;
Where XlsBuf is Record of (Excel Buffer).
In Excel Buffer I create Function "ExportPicture":XlWrkSht.Shapes.AddPicture(FilePathAndName, Param2, Param3, Param4, Param5, Param6, Param7);
Where XlWrkSht is Excel Automation.
This method requred to determine this parameters (Param6 - WIDTH, Param7 - Height), but my pictures have very different sizes and I need auto-scale0 -
I Keeper RU,
I have a customized report in the series 50000,
the report prints a image in classic.
The export to excel functionality is completed.
How could i get the same image that is printing for classic, in the excel sheet0 -
Lamba wrote:I Keeper RU,
I have a customized report in the series 50000,
the report prints a image in classic.
The export to excel functionality is completed.
How could i get the same image that is printing for classic, in the excel sheet
I have described above, all the necessary code.
In "Excel Buffer" (table) I create Function "ExportPicture" (with 7 parameters):
XlWrkSht.Shapes.AddPicture(FilePathAndName, Param2, Param3, Param4, Param5, Param6, Param7);
In the report I call this function:
XlsBuf.ExportPicture(FilePath, 1, 1, 0, 493, 370, 250);0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions