Jump to content
Fivewin Brasil

usando o CreateObject( "excel.application")


gibaf

Recommended Posts

ola

nesses ae em cima, nao fala nada em fazer com RGB...

se alguem mais souber e puder ajudar, eu fico agradecido: MUITO OBRIGADO !!!

Link to comment
Share on other sites

encontrei isso no manual da microsoft, mas, nao estou conseguindo aplicar na app:

Set myDocument = Worksheets(1)
With myDocument.Shapes.AddShape(msoShapeRectangle, _
90, 90, 90, 50).Fill
.ForeColor.RGB = RGB(128, 0, 0)
.BackColor.RGB = RGB(170, 170, 170)
.TwoColorGradient msoGradientHorizontal, 1
End With

alguem pode ajudar ??

obrigado

Link to comment
Share on other sites

isso ja adianto que nao funciona, na hora da compilação ele muda para:

oSheet:Cells(2,2):Interior:ColorIndex := nRGB( 000, 162, 232)

mas pode tentar assim:

oSheet:Cells(2,2):Interior:ForeColor:RGB := nRGB(000,162,232)

OU

oSheet:Cells(2,2):ForeColor:RGB := nRGB(000,162,232)

Tente assim:
#Define CLR_LCOR     nRGB( 000, 162, 232)
 
 
oSheet:Cells(2,2):Interior:ColorIndex := CLR_LCOR
Link to comment
Share on other sites

Tente assim:
#Define CLR_LCOR     nRGB( 000, 162, 232)
 
 
oSheet:Cells(2,2):Interior:ColorIndex := CLR_LCOR

error...

acho q tem ser mais ou menos como diz o help do microsoft:

http://msdn.microsoft.com/pt-br/library/office/ff194068.aspx

Set myDocument = Worksheets(1)

With myDocument.Shapes.AddShape(msoShapeRectangle, _

90, 90, 90, 50).Fill

.ForeColor.RGB = RGB(128, 0, 0)

.BackColor.RGB = RGB(170, 170, 170)

.TwoColorGradient msoGradientHorizontal, 1

End With

Link to comment
Share on other sites

Mata aqui Eduardo, pois é o que eu entendi na classe:

http://fivewin.com.br/index.php?/topic/21090-excel-dbf-resolvido/

 
/*
 *  TExcelScript():RangeFondo()
 */
METHOD RangeFondo( cRange , nColor )  CLASS TExcelScript
 
  DEFAULT nColor := Rgb(255 , 255 , 255 )
 
  ::oSheet:Range( cRange ):Interior:Color := nColor
 
RETURN Self
 

Que dificuldade.

abs,

Link to comment
Share on other sites

Mata aqui Eduardo, pois é o que eu entendi na classe:

http://fivewin.com.br/index.php?/topic/21090-excel-dbf-resolvido/

 
/*
 *  TExcelScript():RangeFondo()
 */
METHOD RangeFondo( cRange , nColor )  CLASS TExcelScript
 
  DEFAULT nColor := Rgb(255 , 255 , 255 )
 
  ::oSheet:Range( cRange ):Interior:Color := nColor
 
RETURN Self
 

Que dificuldade.

abs,

ola

eu nao estou usando a classe...

desdo inicio, nunca falei q uso a classe... dae, como sugere, nao tem como eu usar....

uso assim:

oExcel := CreateObject( "Excel.Application" )
oBook := oExcel:WorkBooks:Add()
oSheet := oBook:WorkSheets( 1 )
bla..bla..bla...
Link to comment
Share on other sites

Teoricamente isso resolve mesmo... só tem que ver como preenche esse cRange

::oSheet:Range( cRange ):Interior:Color := nColor // nColor = nRgb(xxx,xxx,xxx)

Mata aqui Eduardo, pois é o que eu entendi na classe:

http://fivewin.com.br/index.php?/topic/21090-excel-dbf-resolvido/

 
/*
 *  TExcelScript():RangeFondo()
 */
METHOD RangeFondo( cRange , nColor )  CLASS TExcelScript
 
  DEFAULT nColor := Rgb(255 , 255 , 255 )
 
  ::oSheet:Range( cRange ):Interior:Color := nColor
 
RETURN Self
 

Que dificuldade.

abs,

Link to comment
Share on other sites

essa aqui resolve, matou Kapiaba

oSheet:Cells( nHeaderRow, n ):Interior:Color := RGB(0,0,128)

oSheet:Cells( nHeaderRow, n ):Font:Color := RGB( 255, 255, 255 )

talvez possa precisar dessa tb:

oSheet:Cells( nHeaderRow, n ):Interior:Pattern := 1

Link to comment
Share on other sites

essa aqui resolve, matou Kapiaba

oSheet:Cells( nHeaderRow, n ):Interior:Color := RGB(0,0,128)

oSheet:Cells( nHeaderRow, n ):Font:Color := RGB( 255, 255, 255 )

talvez possa precisar dessa tb:

oSheet:Cells( nHeaderRow, n ):Interior:Pattern := 1

vdd.. agora, com essa, deu

obrigado a todos !!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...