cancel
Showing results for 
Search instead for 
Did you mean: 

String Should appear BOLD in Excel - called from BSP

Former Member
0 Kudos

Hi,

I want to show the following line "This line is bold" in BOLD in Excel.

This line is xstring and is called from a BSP Application using the String_to_XString functional module. The Excel application opens in the web.

My question is how to encode the string "This line is bold" so that it appears in BOLD in Excel

Thanks

Message was edited by: SAP User

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

You will need to define a style sheet in css.

Check http://www.w3schools.com/css/default.asp for a tutorial and http://www.w3schools.com/css/css_examples.asp

for ready made examples.

Regards,

Azaz Ali.

Former Member
0 Kudos

Hi Azaz,

Thanks. I think a CSS is more for a HTML formating. But I want a Excel FOrmating.

I was trying to search in the ABAP class cl_abap_char_utilities if it has any attributes for making a string BOLD, but It seems it dosent have any.

Thanks

Message was edited by: SAP User

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

What format is your data in going into Excel - I assume it is plain text (probably tab delimited)? If so there really are no formatting options. Open up excel and bold something. Then save it as a plain text file. Your formatting is lost.

In order to be able to use formatting in Excel you will have to take one of two approaches. First you could send the data out to Excel as XML. The XML approach allows you to pass some formatting alone with the text. This is what is done in ABAP Web Dynpro. The XML format for Excel is document on the Microsoft Website. You could also setup a document the way you want it and then do a save as XML.

The other approach is to use Office Web Controls. Here is a weblog on the subject:

/people/thomas.jung3/blog/2005/02/14/bsp-and-microsoft-excel--learning-to-live-together

/people/thomas.jung3/blog/2005/02/23/bsp-and-microsoft-excel--learning-to-live-together-part-2

But either approach is a heck of lot of work just to bold something. I hope your users appreciate the effort.

Former Member
0 Kudos

Hi Thomas,

APologize for the delay in replying. I have informed the users that it may not be feasible to do formating in excel and they agreed to do it manually. Thanks for your timely input.

Thanks