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

Вставка в Exel динамической таблицы



 
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> ABAP
View previous topic :: View next topic  
Author Message
Mania4e11o
Участник
Участник


Age: 33
Joined: 12 Dec 2011
Posts: 47
Location: Рязань

PostPosted: Mon Mar 12, 2012 7:04 pm    Post subject: Вставка в Exel динамической таблицы Reply with quote

Взлетная площадка: шаблон Exel , динамическая внутренняя таблица.

При вставке динамической таблицы, она заезжает на ячейки уже заполненные в шаблоне и затирает их.

Как справиться?
Back to top
View user's profile Send private message Blog
vga
Мастер
Мастер


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

PostPosted: Tue Mar 13, 2012 1:19 pm    Post subject: Reply with quote

Как обещал Smile

В excel шаблоне первую ячейку называете (в поле Name Box) ITEM_TABLE

Затем с помощью макроса раздвигаете на количество строк, которые нужно вставить

Code:
Sub InsertLines(p_lines As Integer)
'
If p_lines > 0 Then
  Range("ITEM_TABLE").Select
  Rows(Selection.Row & ":" & Selection.Row).Select
  Selection.Copy
  Rows(Selection.Row + 1 & ":" & Selection.Row + p_lines).Select

  Selection.Insert Shift:=xlDown
  Application.CutCopyMode = False
End If
End Sub

_________________
Молитва - это запрос разработчику на изменение кода программы.
Back to top
View user's profile Send private message Blog Visit poster's website
Mania4e11o
Участник
Участник


Age: 33
Joined: 12 Dec 2011
Posts: 47
Location: Рязань

PostPosted: Fri Mar 16, 2012 8:13 pm    Post subject: Reply with quote

Извиняюсь,за столь поздний ответ!
Спасибо большое за макрос!!(работает!)

А нет другого способа? Без макроса...например на предприятии в целях безопасности запрещены макросы...есть выход?
Back to top
View user's profile Send private message Blog
Display posts from previous:   
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> ABAP All times are GMT + 4 Hours
Page 1 of 1

 
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.