2011 Dec 28 5:01 PM
Hi everybody,
When I use ABAP & OLE Automation Controller to build a Excel file, I don't find a documentation about the values of the properties parameters.
For example:
(DATA gs_cell TYPE ole2_object.)
SET PROPERTY OF gs_cell 'HorizontalAlignment' = -4108 .
I found in Visual Basic Editor all properties of the OLE objects. But the number -4108 remains a mystery for me.
Where can we find this value ?
I tried to read the official Microsoft and ABAP documentation without success.
Can you help me ?
I thank you in advance.
Patrocle
2011 Dec 28 5:37 PM
Hi,
I use http://msdn.microsoft.com/en-us/library/ms262200.aspx site
In the documentation for Range.HorizontalAlignment You can find it uses XlHAlign:
http://msdn.microsoft.com/en-us/library/bb241313(v=office.12).aspx
Name Value Description
xlHAlignCenter -4108 Center.
xlHAlignCenterAcrossSelection 7 Center across selection.
xlHAlignDistributed -4117 Distribute.
xlHAlignFill 5 Fill.
xlHAlignGeneral 1 Align according to data type.
xlHAlignJustify -4130 Justify.
xlHAlignLeft -4131 Left.
xlHAlignRight -4152 Right.
Regards,
--
Przemysław
Hi everybody,
When I use ABAP & OLE Automation Controller to build a Excel file, I don't find a documentation about the values of the properties parameters.
For example:
(DATA gs_cell TYPE ole2_object.)
SET PROPERTY OF gs_cell 'HorizontalAlignment' = -4108 .
I found in Visual Basic Editor all properties of the OLE objects. But the number -4108 remains a mystery for me.
Where can we find this value ?
I tried to read the official Microsoft and ABAP documentation without success.
Can you help me ?
I thank you in advance.
Patrocle
2011 Dec 28 5:37 PM
Hi,
I use http://msdn.microsoft.com/en-us/library/ms262200.aspx site
In the documentation for Range.HorizontalAlignment You can find it uses XlHAlign:
http://msdn.microsoft.com/en-us/library/bb241313(v=office.12).aspx
Name Value Description
xlHAlignCenter -4108 Center.
xlHAlignCenterAcrossSelection 7 Center across selection.
xlHAlignDistributed -4117 Distribute.
xlHAlignFill 5 Fill.
xlHAlignGeneral 1 Align according to data type.
xlHAlignJustify -4130 Justify.
xlHAlignLeft -4131 Left.
xlHAlignRight -4152 Right.
Regards,
--
Przemysław
2011 Dec 29 8:17 AM
Thank for the reply Przemysław.
It is exactly I needed.
Regards,
2012 Jan 10 12:40 PM
Take a look to program (SE38) EXCEL__C
All these constants are already defined in ABAP with this include.
In transaction SOLE, you could check that OLE application EXCEL.APPLICATION defines the include Program with this value.
So all these constants could be used (instead of their integer values).
(Valid for Netweaver 7.0).
2012 Jan 10 2:44 PM
Thank for your reply.
In my opinion, the microsoft documentation is better than this program because the informations are more detailed.
However, this solution can give some services !
Regards,
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |