SAP R/3 форум ABAP консультантов
Russian ABAP Developer's Club

Home - FAQ - Search - Memberlist - Usergroups - Profile - Log in to check your private messages - Register - Log in - English
Blogs - Weblogs News

Автоподбор высоты в Excel


Goto page Previous  1, 2
 
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> ABAP
View previous topic :: View next topic  
Author Message
vga
Мастер
Мастер


Age: 85
Joined: 04 Oct 2007
Posts: 1218
Location: Санкт-Петербург

PostPosted: Tue Feb 05, 2008 4:00 pm    Post subject: Reply with quote

Наверно со значаениями LineStyle нужно поэкспериментировать

Code:
*---------------------------------------------------------------------*
*       FORM border                                                   *
*---------------------------------------------------------------------*
*       ........                                                      *
*---------------------------------------------------------------------*
*  -->  we                                                            *
*---------------------------------------------------------------------*
form border using we.
*left
  call method of CELL 'BORDERS' = BORDERS exporting #1 = '1'.
  set property of borders 'LineStyle' = '1'.
  set property of borders 'WEIGHT' = we.                    "4=max
  free object borders.
* right
  call method of CELL 'BORDERS' = BORDERS exporting #1 = '2'.
  set property of borders 'LineStyle' = '2'.
  set property of borders 'WEIGHT' = we.
  free object borders.
* top
  call method of CELL 'BORDERS' = BORDERS exporting #1 = '3'.
  set property of borders 'LineStyle' = '3'.
  set property of borders 'WEIGHT' = we.
  free object borders.
* bottom
  call method of CELL 'BORDERS' = BORDERS exporting #1 = '4'.
  set property of borders 'LineStyle' = '4'.
  set property of borders 'WEIGHT' = we.
*    set property of borders 'ColorIndex' = 'xlAutomatic'.
  free object borders.
endform.



Quote:
159 в двоичной системе это 10011111, т.е. этот код его и представляет:
ASSIGN typ TO <fs> CASTING.
SET BIT 1 OF <fs> TO 1. "thickness
SET BIT 2 OF <fs> TO 0. "thickness
SET BIT 3 OF <fs> TO 0. "horizontal lines
SET BIT 4 OF <fs> TO 1. "vertical lines
SET BIT 5 OF <fs> TO 1. "right margin
SET BIT 6 OF <fs> TO 1. "bottom margin
SET BIT 7 OF <fs> TO 1. "top margin
SET BIT 8 OF <fs> TO 1. "left margin

Точно так же можно интерпретировать любое другое число от 0 до 255. А комментарии к соответствующим битам задают либо выводить компонент (1), либо нет (0).
Back to top
View user's profile Send private message Blog Visit poster's website
july7
Старший специалист
Старший специалист



Joined: 10 Oct 2007
Posts: 109
Location: Киров

PostPosted: Tue Feb 05, 2008 5:05 pm    Post subject: Reply with quote

Попробуйте так:

Code:

DATA: o_borders TYPE ole2_object.
* Внутренние вертикальные линии
  CALL METHOD OF o_range 'Borders' = o_borders
    EXPORTING
      #1 = 11.
  SET PROPERTY OF o_borders 'LineStyle' = 1.
"  SET PROPERTY OF o_borders 'Weight' = l_brd_weight.
"  SET PROPERTY OF o_borders 'ColorIndex' = l_brd_color.

* Внутренние горизонтальные линии
  CALL METHOD OF o_range 'Borders' = o_borders
    EXPORTING
      #1 = 12.
  SET PROPERTY OF o_borders 'LineStyle' = 1.
 
Back to top
View user's profile Send private message
cbw07
Старший специалист
Старший специалист



Joined: 30 Nov 2007
Posts: 127

PostPosted: Tue Feb 05, 2008 7:35 pm    Post subject: Reply with quote

так работает, спасибо
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> ABAP All times are GMT + 4 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG.
SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG.
Every effort is made to ensure content integrity. Use information on this site at your own risk.