Q
Problem solve Get help with specific problems with your technologies, process and projects.

Creating a "wrap text" format in Excel VBA

How to create columns, also known as wrap text, in Excel VBA.

Is there any way to programmatically create an Excel spreadsheet defining a column with "wrap text" format? I have...

searched the SAP library, but the results were discouraging.

In Excel VBA, to set a column, e.g., D to "Wrap Text", you use:

Columns("D:D").WrapText = True

To do this in ABAP, you'd need to create an OLE Excel object, using (omitting definitions) something like:

CREATE OBJECT o_wks 'Excel.Application' NO FLUSH. 
GET PROPERTY OF o_wks 'Range' = o_rng1 NO FLUSH exporting #1 = 'D:D'. 
SET PROPERTY OF o_rng1 'WrapText' = '1'.
This was last published in November 2006

Dig Deeper on SAP workflow development

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchERP

SearchOracle

SearchDataManagement

SearchAWS

SearchBusinessAnalytics

SearchCRM

SearchContentManagement

SearchHRSoftware

Close