Excel OLE Zellen farbig markieren

Alles rund um die Sprache ABAP®: Funktionsbausteine, Listen, ALV

Excel OLE Zellen farbig markieren

Postby Manuel2507 » Thu Oct 26, 2017 10:33 am

Hallo,

ich möchte in einer mittels OLE erzeugten Excel-Datei Zellen farbig markieren.

Der Makro sieht so aus:

Code: [Select all] [Expand/Collapse] [Download] (Untitled.txt)
  1.  Range("I1:M4").Select
  2.     With Selection.Interior
  3.         .Pattern = xlSolid
  4.         .PatternColorIndex = xlAutomatic
  5.         .Color = 5296274
  6.         .TintAndShade = 0
  7.         .PatternTintAndShade = 0
  8.     End With
  9.     Application.Goto Reference:="Makro1"
  10.  
GeSHi ©


Wie setze ich das in ABAP um.
Folgende Variante habe ich probiert:

Code: [Select all] [Expand/Collapse] [Download] (Untitled.txt)
  1.       CALL METHOD OF sheet 'RANGE' = item
  2.         EXPORTING
  3.         #1 = 'i1:m999'.
  4. *      SET PROPERTY OF item 'PatternColorIndex' = -4105.  "xlAutomatic
  5.       SET PROPERTY OF item 'Interior.Color' = 5296274.  
  6.  
GeSHi ©


Das funktioniert aber nicht. Kann mir jemand weiterhelfen?

Viele Grüße
Kerstin
Manuel2507
...
...
 
Posts: 289
Joined: Fri Jan 07, 2005 3:13 pm

Re: Excel OLE Zellen farbig markieren

Postby Manuel2507 » Fri Oct 27, 2017 8:51 am

Hallo,
ich habe selbst eine Lösung gefunden:

https://blogs.sap.com/2012/03/29/using- ... xcel-file/

Gruß
Kerstin
Manuel2507
...
...
 
Posts: 289
Joined: Fri Jan 07, 2005 3:13 pm


Return to ABAP® Core

Who is online

Users browsing this forum: No registered users and 2 guests

cron