Android Question jexcel BackgroundColor RGB

sigster

Active Member
Licensed User
Longtime User
Hi

is it poseble to change BackgroundColor using Colors.RGB(0, 255, 0)

Code: Copy


Sigster
 
Hi

is it poseble to change BackgroundColor using Colors.RGB(0, 255, 0)

Code: Copy


Sigster
Yes, you can change BackgroundColor using RGB value, but you need to override the color member of the cellFormat using javaobject or convert RGB color to jxl.format.Color with inline java.

B4X: Copy
Dim j as javaobject = newWorkbook
j.runmethod("setColourRGB", Array(cellFormat.COLOR_GREY_25_PERCENT, 0, 255, 0))
cellFormat.BackgroundColor = cellFormat.COLOR_GREY_25_PERCENT
 
Upvote 0
it don't change the color
how can I connect this java to = cell.SetCellFormat(rowsFormat)

B4X: Copy
            Dim j As JavaObject = newWorkbook
            j.runmethod("setColourRGB", Array(cellFormat.COLOR_GREY_25_PERCENT, 51, 51, 255))
            cellFormat.BackgroundColor = cellFormat.COLOR_GREY_25_PERCENT           
            
            cell.InitializeText(1, RowCount, colorcode)           
            sheet1.AddCell(cell)
            cell.SetCellFormat(rowsFormat)
 
Upvote 0
Sorry I can change color
but I need to change RGB color inside Do While Crsr.NextRow when I get RGB color from the database
 
Upvote 0
Back
Top