Q

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

PRO+

Content

Find more PRO+ content and other member only offers, here.

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.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

-ADS BY GOOGLE

SearchManufacturingERP

SearchOracle

SearchDataManagement

SearchAWS

SearchBusinessAnalytics

SearchCRM

SearchContentManagement

SearchFinancialApplications

Close