cancel
Showing results for 
Search instead for 
Did you mean: 

ABAP2XLSX change comment size

oliver_am
Active Participant
0 Kudos

Hello.

I'm using ABAP2XLSX to create some excel files.

I need to add comments in some cells.
I've seen the example ZDEMO_EXCEL_COMMENTS and I've managed to create comments in my file.

The problem is that the size of the comment is too small. And I cannot see any option in the method add_comment to change the size.

So I'm trying to change the size of all the comments added by code (by the moment).
In class ZCL_EXCEL_WRITER_2007 and method CREATE_XL_DRAWING_FOR_COMMENTS I've seen a line to create the shape of the comment and the following line:


lc_xml_attr_style       value 'size:auto;width:auto;height:auto;position:absolute;margin-left:117pt;margin-top:172.5pt;z-index:1;visibility:hidden' ),

I'm trying to change the width and height and some other values in this line, buy nothing happens.

I've tried removing "size:auto"
and put "width:900pt;height:40pt "

Any tip?

Thanks

oliver_am
Active Participant
0 Kudos

this is the XML generated in this part:

<?xml version="1.0" encoding="utf-8"?>
<xml xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel">
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1"/>
</o:shapelayout>
<v:shapetype id="_x0000_t202" coordsize="21600,21600" o:spt="202" path="m,l,21600r21600,l21600,xe">
<v:stroke joinstyle="miter"/>
<v:path gradientshapeok="t" o:connecttype="rect"/>
</v:shapetype>
<v:shape id="_x0000_s1025 " type="#_x0000_t202" style="size:auto;width:auto;height:auto;position:absolute;margin-left:117pt;margin-top:172.5pt;z-index:1;visibility:hidden" fillcolor="#ffffe1" o:insetmode="auto">
<v:fill color2="#ffffe1"/>
<v:shadow on="t" color="black" obscured="t"/>
<v:path o:connecttype="none"/>
<v:textbox style="mso-direction-alt:auto">
<div style="text-align:left"/>
</v:textbox>
<x:ClientData ObjectType="Note">
<x:MoveWithCells/>
<x:SizeWithCells/>
<x:Anchor>2, 15, 11, 10, 4, 31, 15, 9</x:Anchor>
<x:AutoFill>False</x:AutoFill>
<x:Row>9 </x:Row>
<x:Column>2 </x:Column>
</x:ClientData>
</v:shape>
<v:shape id="_x0000_s1026 " type="#_x0000_t202" style="size:auto;width:auto;height:auto;position:absolute;margin-left:117pt;margin-top:172.5pt;z-index:1;visibility:hidden" fillcolor="#ffffe1" o:insetmode="auto">
<v:fill color2="#ffffe1"/>
<v:shadow on="t" color="black" obscured="t"/>
<v:path o:connecttype="none"/>
<v:textbox style="mso-direction-alt:auto">
<div style="text-align:left"/>
</v:textbox>
<x:ClientData ObjectType="Note">
<x:MoveWithCells/>
<x:SizeWithCells/>
<x:Anchor>2, 15, 11, 10, 4, 31, 15, 9</x:Anchor>
<x:AutoFill>False</x:AutoFill>
<x:Row>9 </x:Row>
<x:Column>3 </x:Column>
</x:ClientData>
</v:shape>
</xml>

Accepted Solutions (0)

Answers (0)