Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

ABAP & OLE Automation Controller

Former Member
0 Likes
1,326

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,155

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

4 REPLIES 4
Read only

Former Member
0 Likes
1,156

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

Read only

0 Likes
1,155

Thank for the reply Przemysław.

It is exactly I needed.

Regards,

Read only

joseph_dimijian
Newcomer
0 Likes
1,155

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).

Read only

0 Likes
1,155

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,