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

Formatting an excel

Former Member
0 Likes
665

i create an excel file from an abap report.I create the workbooks ,fills the cells,etc

At this moment i need to format the excel with colors ,fonts etc . i don't know the property ,objects ,methods to do that

1 ACCEPTED SOLUTION
Read only

former_member182670
Contributor
0 Likes
553

You can try this link:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_wrcore/html/wrtskhowtoapplystyle...

there is information about formatting excel sheets from your code and many other useful hints.

Link to Excel Object Model Reference is:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbaxl11/html/Welcome_HV01134775.asp

Sample code to make your cell bold:

Worksheets("Sheet1").Range("A1:C5").Font.Bold = True

i create an excel file from an abap report.I create the workbooks ,fills the cells,etc

At this moment i need to format the excel with colors ,fonts etc . i don't know the property ,objects ,methods to do that

3 REPLIES 3
Read only

former_member182670
Contributor
0 Likes
554

You can try this link:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_wrcore/html/wrtskhowtoapplystyle...

there is information about formatting excel sheets from your code and many other useful hints.

Link to Excel Object Model Reference is:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbaxl11/html/Welcome_HV01134775.asp

Sample code to make your cell bold:

Worksheets("Sheet1").Range("A1:C5").Font.Bold = True

Read only

0 Likes
553

Hi Jorge

By the way, you can also refer to the tutorial <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/technologies/an%20easy%20reference%20for%20ole%20automation.article">"An Easy Reference For OLE Automation"</a>

As a second point, since you are new to this forum, let me introduce the portion of sytematic about assigning points. Not strictly relating with this specific thread, you can assign points to posts you find helpful while solving your questions. You can assign points by using the points scala at the left of each post. By giving a 10-point or choosing "Solved by own" at the left of your original post, you sign the thread as closed which makes SDNers save their time.

Regards

*--Serdar <a href="https://www.sdn.sap.com:443http://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.sdn.businesscard.sdnbusinesscard?u=qbk%2bsag%2bjiw%3d">[ BC ]</a>

Read only

former_member182670
Contributor
0 Likes
553

Pls don't forget to reward , if answers are helpful !