Cell Fill Color in Excel

Hi all!
I'm trying to fill the header of a table from SAP to Excel. Does anyone now
the correct steps of set get and properties needed to do this?
Thanks!

Hi Ashutosh...Use the below code i think it will be helpful
This program demonstrates how to send abap data to excel sheet
using OLE automation
include ole2incl.
*handles for OLE object
data: h_excel type ole2_object,         " Excel object
      h_mapl  type ole2_object,         " list of workbooks
      h_map   type ole2_object,         " workbook
      h_zl    type ole2_object,         " cell
      h_f     type ole2_object.         " font
data: h type i.
types: begin of t_bkpf,
       bukrs type bkpf-bukrs,
       belnr type bkpf-belnr,
       gjahr type bkpf-gjahr,
       blart type bkpf-blart,
       budat type bkpf-budat,
       end of t_bkpf.
data: it_bkpf type standard table of t_bkpf,
      wa_bkpf type t_bkpf.
********start-of-selection*******************
start-of-selection.
select bukrs
        belnr
        gjahr
        blart
        budat  into table it_bkpf
               from bkpf
               up to 10 rows.
call function 'SAPGUI_PROGRESS_INDICATOR'
exporting
  PERCENTAGE       = 0
   text             = text-001
exceptions
            others     = 1.
Start excel
create object h_excel 'EXCEL.APPLICATION'.
perform err_hdl.
set property of h_excel 'Visible' = 1.
perform err_hdl.
call function 'SAPGUI_PROGRESS_INDICATOR'
exporting
  PERCENTAGE       = 0
   text             = text-002
   exceptions
            others     = 1.
call method of h_excel 'workbooks'  = h_mapl.
perform err_hdl.
Add a new workbook
call method of h_mapl 'Add' = h_map.
perform err_hdl.
call function 'SAPGUI_PROGRESS_INDICATOR'
exporting
  PERCENTAGE       = 0
   text             = text-003
   exceptions
            others     = 1.
Output Column Headings to active excel sheet
  perform fill_cell using 1 1 1 text-004.
  perform fill_cell using 1 2 1 text-005.
  perform fill_cell using 1 3 1 text-006.
  perform fill_cell using 1 4 1 text-007.
  perform fill_cell using 1 5 1 text-008.
Copy internal table to excel sheet
  loop at it_bkpf into wa_bkpf.
    h = sy-tabix  + 1.
  perform fill_cell1 using h 1 0 wa_bkpf-bukrs.
  perform fill_cell2 using h 2 0 wa_bkpf-belnr.
  perform fill_cell1 using h 3 0 wa_bkpf-gjahr.
  perform fill_cell1 using h 4 0 wa_bkpf-blart.
  perform fill_cell1 using h 5 0 wa_bkpf-budat.
  endloop.
disconnect from Excel
  free object h_excel.
  perform err_hdl.
*&      Form  err_hdl
      text
-->  p1        text
<--  p2        text
form err_hdl .
if sy-subrc <> 0.
  write: / 'Error in OLE Automation'.
  stop.
endif.
endform.                    " err_hdl
*&      Form  fill_cell
      text
     -->P_1      text
     -->P_1      text
     -->P_1      text
     -->P_TEXT_004  text
form fill_cell  using  i j bold val.
call method of h_excel 'Cells' = h_zl exporting #1 = i #2 = j.
  perform err_hdl.
  set property of h_zl 'Value' = val .
  perform err_hdl.
  get property of h_zl 'Font' = h_f.
  perform err_hdl.
  set property of h_f 'Bold' = bold .
  perform err_hdl.
set property of h_f 'colorindex' = 10.
endform.                    " fill_cell
*&      Form  fill_cell1
      text
     -->P_H  text
     -->P_1      text
     -->P_0      text
     -->P_WA_BKPF_BUKRS  text
form fill_cell1  using  i j bold val.
call method of h_excel 'Cells' = h_zl exporting #1 = i #2 = j.
  perform err_hdl.
  set property of h_zl 'Value' = val .
  perform err_hdl.
  get property of h_zl 'Font' = h_f.
  perform err_hdl.
  set property of h_f 'Bold' = bold .
  perform err_hdl.
endform.                    " fill_cell1
*&      Form  fill_cell2
      text
     -->P_H  text
     -->P_2      text
     -->P_0      text
     -->P_WA_BKPF_BELNR  text
form fill_cell2  using  i j bold val.
call method of h_excel 'Cells' = h_zl exporting #1 = i #2 = j.
  perform err_hdl.
  set property of h_zl 'Value' = val .
  perform err_hdl.
  get property of h_zl 'Font' = h_f.
  perform err_hdl.
  set property of h_f 'Bold' = bold .
  perform err_hdl.
set property of h_f 'colorindex' = 13.
endform.                    " fill_cell2

Similar Messages

  • Excel 2007 to Acrobat 9 Pro cell fill / font issue

    When attempting to convert a workbook from Excel 2007 to a pdf using Acrobat 9 Pro, the cell font color prints slightly lighter than the cell fill color, even when the colors are the same - amber, green or red.  Never had an issue previously until now.  Not visible within the file, only when printing.  Any insight or suggestions are greatly appreciated! 

    Thanks for your reply Bill@VT.  I am converting using the Acrobat addin in Excel.  I read your e-mail and played with some of the Excel sheets.  The problem seems to arise when I am converting a landscape page that has been reduced to fit on one page whether by percentage or by fit to x pages by x pages.  I have tried various settings and in print preview they all look just fine but once I click the convert but the page size grows.  I am wondering if this is not an Acrobat problem but rather an Excel problem.

  • Upload Cell Filled With Color In Excel

    Hi All ABAP GURUS,
    I have got the requirement to upload the excel file in sap.
    The excel file contains 2 columns-
        Color_Code            Color
            R1                     (Here excel cell will be filled with Red Color)
            G1                     (Here excel cell will be filled with Light Green Color)
            G2                     (Here excel cell will be filled with Dark Green Color) and so on....
    How to save the Color_Code And Color in ZTable. I have the clear idea about BDC that can upload excel file containing data but no idea hoe to upload the Excel file containing Fill Color.
    Kindly guide me in this matter.
    Thanks & Regards,
    Bharti Jain

    Hi.,
    If you are talking abt coouring the column in Report then go here
    http://www.sap-basis-abap.com/abap/color-a-column-value-in-alv-report.htm
    Regards
    GK.

  • Script to change fill color based on excel data?

    Hi.  I'm curious if there is a way to change the fill color of, say a rectangle, in Illustrator based on data in an excel spreadsheet (csv or whatever).  For example: say the data in the excel cell is 1 and that corresponds to the rectangle in Illustrator having a yellow fill...  Now say I update the data in the cell to 2 and save.  I run the script and it makes the box red.  Is that even remotely possible?  Thanks.

    Hi, yes it's possible, I used VBA on Windows
    Assuming you have an Illustrator file with 1 square, and 2 swatches named "yellow" and "red"
    this is how I set up the excel file
    type the formula in cell F2 as shown, make your color updates on cell E2
    VBA code:
    Sub recolorSquare()
        Dim iapp As New Illustrator.Application
        Dim idoc As Illustrator.Document
        Dim rect As Illustrator.PathItem
        Dim whatColor As String
        whatColor = range("F2")
        Set idoc = iapp.ActiveDocument
        Set rect = idoc.PathItems(1)
        rect.FillColor = idoc.Swatches(whatColor).Color
        Set rect = Nothing
        Set idoc = Nothing
        Set iapp = Nothing
    End Sub

  • Re:colors in Excel sheet (first row should be completely filled with yellow

    I am using the type pools OLE2 to put colors in the Excel sheet.
    What is the property to fill color in the Excel sheet cell.
    i got the text in colors but not the background...
    for example:
    i need the first row ie..the heading to be in yellow.
    Can some one send me some sample code .plz its urgent..........

    Hi,
    Check to see the following code:
     Sub Find_match()
        Dim Range1 As Range
        Dim Range2 As Range
        Set Range1 = Application.InputBox("Select the range on the first sheet to Compare", Type:=8)
        Set Range2 = Application.InputBox("Select the range on the second sheet to Compare", Type:=8)
    Dim range_row1 As Integer
    Dim range_row2 As Integer
    Dim loop_row1 As Integer
    Dim loop_row2 As Integer
    Dim find_value As String
    range_row1 = Range1.Rows.Count
    range_row2 = Range2.Rows.Count
    For loop_row1 = 1 To range_row1
        find_value = Range1.Cells(loop_row1, 1)
        For loop_row2 = 1 To range_row2
            If Range2.Cells(loop_row2, 1) = find_value Then
                If Range1.Cells(loop_row1, 2) = Range2.Cells(loop_row2, 2) Then
                    Range1.Rows(loop_row1).Interior.Color = vbYellow
                End If
            End If
        Next
    Next
    End Sub
    When the macro run, it will prompt to select the range in both sheet, the range is where the cells contain the data, it contains two columns.
    Jaynet Zhang
    TechNet Community Support
    Jaynet,
    Thank you so much. This is exactly how I wanted it to work. The only thing I wanted to know which I will try and figure out while I await your answer is if I can make this work between workbooks instead of worksheets? Currently, it does not allow me to switch
    workbooks when running the macro to select the second range. Thank you.

  • Coloring cells (fill) in Numbers

    Does anyone know if Numbers can function similar to Excel? In Excel when you chose a fill color it remains selected when you move to any other cell in the spreadsheet enabling you to just click on fill to have it filled with exactly the same color. Thus far all I have been able to do with Numbers is to attempt to select the exact same color when I get t the next cell. Additionally, in Excel there is a format painter which enables the user to double click on it and then the format of any cell selected is changed to match the cell you selected with format painter.

    You will soon discover that starting a new thread with a sentence like :
    Does anyone know if Numbers can function similar to Excel?
    is far from being the best thing to do
    When we start using a new application, scanning its menus is the B.A. BA
    In the menu entitled Format, curious/serious users saw the menu items :
    Copy Style ⌥⌘C
    Paste Style ⌥⌘V
    I guess that they are available to be used but maybe I'm just a dumb M…oSoft hater.
    Yvan KOENIG (VALLAURIS, France) dimanche 12 février 2012
    iMac 21”5, i7, 2.8 GHz, 12 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.3
    My Box account  is : http://www.box.com/s/00qnssoyeq2xvc22ra4k

  • Can I change the fill color of an entire row based on what's selected in a pop-up menu in the first cell?

    I have a pop-up menu in the first cell of every row with three choices (and I may add more at a later date).  I want the fill color of the row to change depending on which thing is selected.  Is this hard to do?

    Hi,
    In essence the same as Wayne's answer, but with a slight modification to fit  to duplicate your 'color the whole row' specification. The final result, with Table 2 slid behind Table 1, is shown.
    Table 2 is a single column table with the same number of rows as Table 1. The table is resized to match the full width of Table 1.
    In A2, use the formula =Table 1::A2 to copy the value from that cell in Table 2. Fill the formula down through the rest of the column.
    Select all the cells in Table 2 (except the header row), and apply conditional formatting rules such as those below.
    Note that the Conditional Format rules are set to apply the same colour to text and fill in the cell, so that the text disappears.
    When Table 2 is ready, select it, then go Arrange > Send to Back.
    Before sliding Table 2 behind Table 1, Select Table 1 and use the Table Inspector to set the Cell Background to None (see red arrow in illustration). If This table has a Header column, you need to select the header cells independently and again set the Cell Background to None.
    Now select Table 2 and drag it to a position partially under Table 1. When you see the blue alignment guides on both sides, or at the top and bottom, of Table 1, release the mouse button and use the arrow keys to nudge Table 2 into its final position.
    Regards,
    Barry

  • Colors in Excel Sheet

    I am using the type pools OLE2 to put colors in the Excel sheet.
    What is the property to fill color in the Excel sheet cell.
    Also I need to merge cells in the excel sheet.
    Can some one send me some sample code if you have?
    Please help.Its urgent.

    hi rowal,
    Hi Ashutosh...Use the below code i think it will be helpful
    This program demonstrates how to send abap data to excel sheet
    using OLE automation
    include ole2incl.
    *handles for OLE object
    data: h_excel type ole2_object, " Excel object
    h_mapl type ole2_object, " list of workbooks
    h_map type ole2_object, " workbook
    h_zl type ole2_object, " cell
    h_f type ole2_object. " font
    data: h type i.
    types: begin of t_bkpf,
    bukrs type bkpf-bukrs,
    belnr type bkpf-belnr,
    gjahr type bkpf-gjahr,
    blart type bkpf-blart,
    budat type bkpf-budat,
    end of t_bkpf.
    data: it_bkpf type standard table of t_bkpf,
    wa_bkpf type t_bkpf.
    ********start-of-selection*******************
    start-of-selection.
    select bukrs
    belnr
    gjahr
    blart
    budat into table it_bkpf
    from bkpf
    up to 10 rows.
    call function 'SAPGUI_PROGRESS_INDICATOR'
    exporting
    PERCENTAGE = 0
    text = text-001
    exceptions
    others = 1.
    Start excel
    create object h_excel 'EXCEL.APPLICATION'.
    perform err_hdl.
    set property of h_excel 'Visible' = 1.
    perform err_hdl.
    call function 'SAPGUI_PROGRESS_INDICATOR'
    exporting
    PERCENTAGE = 0
    text = text-002
    exceptions
    others = 1.
    call method of h_excel 'workbooks' = h_mapl.
    perform err_hdl.
    Add a new workbook
    call method of h_mapl 'Add' = h_map.
    perform err_hdl.
    call function 'SAPGUI_PROGRESS_INDICATOR'
    exporting
    PERCENTAGE = 0
    text = text-003
    exceptions
    others = 1.
    Output Column Headings to active excel sheet
    perform fill_cell using 1 1 1 text-004.
    perform fill_cell using 1 2 1 text-005.
    perform fill_cell using 1 3 1 text-006.
    perform fill_cell using 1 4 1 text-007.
    perform fill_cell using 1 5 1 text-008.
    Copy internal table to excel sheet
    loop at it_bkpf into wa_bkpf.
    h = sy-tabix + 1.
    perform fill_cell1 using h 1 0 wa_bkpf-bukrs.
    perform fill_cell2 using h 2 0 wa_bkpf-belnr.
    perform fill_cell1 using h 3 0 wa_bkpf-gjahr.
    perform fill_cell1 using h 4 0 wa_bkpf-blart.
    perform fill_cell1 using h 5 0 wa_bkpf-budat.
    endloop.
    disconnect from Excel
    free object h_excel.
    perform err_hdl.
    *& Form err_hdl
    text
    --> p1 text
    <-- p2 text
    form err_hdl .
    if sy-subrc <> 0.
    write: / 'Error in OLE Automation'.
    stop.
    endif.
    endform. " err_hdl
    *& Form fill_cell
    text
    -->P_1 text
    -->P_1 text
    -->P_1 text
    -->P_TEXT_004 text
    form fill_cell using i j bold val.
    call method of h_excel 'Cells' = h_zl exporting #1 = i #2 = j.
    perform err_hdl.
    set property of h_zl 'Value' = val .
    perform err_hdl.
    get property of h_zl 'Font' = h_f.
    perform err_hdl.
    set property of h_f 'Bold' = bold .
    perform err_hdl.
    set property of h_f 'colorindex' = 10.
    endform. " fill_cell
    *& Form fill_cell1
    text
    -->P_H text
    -->P_1 text
    -->P_0 text
    -->P_WA_BKPF_BUKRS text
    form fill_cell1 using i j bold val.
    call method of h_excel 'Cells' = h_zl exporting #1 = i #2 = j.
    perform err_hdl.
    set property of h_zl 'Value' = val .
    perform err_hdl.
    get property of h_zl 'Font' = h_f.
    perform err_hdl.
    set property of h_f 'Bold' = bold .
    perform err_hdl.
    endform. " fill_cell1
    *& Form fill_cell2
    text
    -->P_H text
    -->P_2 text
    -->P_0 text
    -->P_WA_BKPF_BELNR text
    form fill_cell2 using i j bold val.
    call method of h_excel 'Cells' = h_zl exporting #1 = i #2 = j.
    perform err_hdl.
    set property of h_zl 'Value' = val .
    perform err_hdl.
    get property of h_zl 'Font' = h_f.
    perform err_hdl.
    set property of h_f 'Bold' = bold .
    perform err_hdl.
    set property of h_f 'colorindex' = 13.
    endform. " fill_cell2
    hope the code will help you to solve the problem,
    reward points if usefull,
    Thanks ,
    kalyan.

  • Right way to change datagrid row, column, cells background colors in code-behind?

    Hi all,
    I have a winform program that I'm upgrading to wpf (I'm new to wpf). The wpf code for the function (SetdataGridBackgroundColors()) is below with the winform code commented out so I can fix it.  I have a datagrid with a Cornsilk background color alteranating
    with LightGreen depending on the content of datetime  cell. If the day portion of the datetime is different then the color changes from one to the other. I used a colorIndex variable because at the end of the month it could go from 31 to 1 and that would
    not work if I use the day directly.
    I tried this line to change the background color:
    optionsDataDatagrid.RowBackground = new SolidColorBrush(Colors.Cornsilk);
    this works but it changes every row. I found this other stuff:
    DataGridRow currentRowColor = optionsDataDatagrid.ItemContainerGenerator.ContainerFromIndex(i) as DataGridRow;
    //DataGridRow currentRowColor = optionsDataDatagrid.ItemContainerGenerator.ContainerFromItem(optionsDataDatagrid.Items[i]) as DataGridRow;
    currentRowColor.Background = new SolidColorBrush(Colors.Cornsilk);
    Either ContainerFromIndex or ContainerFromItem throw an exception because currentRowColor is null. I looked at optionsDataDatagrid.Items[i] and is not null. Then I read that using ItemContainerGenerator is not a good idea.
    BTW I'm calling SetdataGridBackgroundColors() after datagrid is been filled with data.
    So... what is the proper way to set each row, column or cell background color in wpf?
    Thanks
    private void SetdataGridBackgroundColors()
    optionRowData rowData = new optionRowData();
    if (optionsDataDatagrid.Items.Count == 0)
    return;
    int colorIndex = 1;
    DateTime savedDate, currentRowDate;
    rowData = optionsDataDatagrid.Items[0] as optionRowData;
    savedDate = rowData.col_datetime.Date; //only compare the date not the time
    for (int i = 0; i < optionsDataDatagrid.Items.Count; i++)
    //currentRowDate = Convert.ToDateTime(optionsDataDatagrid.Rows[i].Cells[3].Value); //winform code
    //currentRowDate = currentRowDate.Date; //winform code
    rowData = optionsDataDatagrid.Items[i] as optionRowData;
    currentRowDate = rowData.col_datetime.Date;
    if (currentRowDate != savedDate)
    colorIndex++;
    savedDate = currentRowDate;
    if (colorIndex % 2 == 0)
    //optionsDataDatagrid.Rows[i].DefaultCellStyle.BackColor = Color.Cornsilk;
    //------------------- testing new code --------------begin
    optionsDataDatagrid.RowBackground = new SolidColorBrush(Colors.Cornsilk); //this changes all rows
    //DataGridRow currentRowColor = optionsDataDatagrid.ItemContainerGenerator.ContainerFromIndex(i) as DataGridRow;
    //DataGridRow currentRowColor = optionsDataDatagrid.ItemContainerGenerator.ContainerFromItem(optionsDataDatagrid.Items[i]) as DataGridRow;
    //currentRowColor.Background = new SolidColorBrush(Colors.Cornsilk);
    //------------------- testing new code --------------end
    //optionsDataDatagrid.Columns[4].DefaultCellStyle.BackColor = Color.DarkSalmon;
    //optionsDataDatagrid.Columns[5].DefaultCellStyle.BackColor = Color.Aquamarine;
    //optionsDataDatagrid.Rows[i].Cells[4].Style.ApplyStyle(optionsDataDataGridView.Columns[4].DefaultCellStyle);
    //optionsDataDatagrid.Rows[i].Cells[5].Style.ApplyStyle(optionsDataDataGridView.Columns[5].DefaultCellStyle);
    else
    //optionsDataDatagrid.Rows[i].DefaultCellStyle.BackColor = Color.LightGreen;
    //------------------- testing new code --------------begin
    optionsDataDatagrid.RowBackground = new SolidColorBrush(Colors.LightGreen); //this has no effect
    //------------------- testing new code --------------end
    //optionsDataDatagrid.Columns[4].DefaultCellStyle.BackColor = Color.Coral;
    //optionsDataDatagrid.Columns[5].DefaultCellStyle.BackColor = Color.LimeGreen;
    //optionsDataDatagrid.Rows[i].Cells[4].Style.ApplyStyle(optionsDataDataGridView.Columns[4].DefaultCellStyle);
    //optionsDataDatagrid.Rows[i].Cells[5].Style.ApplyStyle(optionsDataDataGridView.Columns[5].DefaultCellStyle);

    I (also) strongly recommend mvvm.
    Setting values is a particularly bad idea in this case.
    I don't mean to be rude but your explanation of the requirement is kind of vague.
    I would bind solidcolourbrushes.
    Set the properties based on whatever your logic is within the viewmodel.
    You can switch out what each of the brushes holds when the user clicks wherever.
    So you use a highlightbrush when something or other is true.
    That highlightbrush is set to a blue brush when the user clicks left and a red brush when they click right.
    Please don't forget to upvote posts which you like and mark those which answer your question.
    My latest Technet article - Dynamic XAML

  • Three Numbers questions:how do you change the auto default background or fill color from white to another color to use in multiple succeeding operations?  what is the formula to express the ratio of two numbers as a percent?

    Numbers questioons:
    -how do I change the automatic default background fill color so it stays a non white color?
    -what is the formula to express the ratio of two numbers as a percentage?
    -how do I create a signal formula to be sue against an entire column of data (for example, if I wanted to multiply the each cell in the column by the number 10)?
    -I have created a spreadsheet in Numbers with header and rows labelled and it contains formulas as well.  I now want to create a new 'blank' of this template with same header and row names and formulas, but without the cell entries from my earlier exerciser so I can use again in the future. How do I do this?

    Hi Matt,
    For short columns, the easiest method is to select the cell containing the formula, then grab the fill handle (small circle at the botom right of the selected cell) and drag down.
    For long columns, use either Jerry's suggestion (copy/paste) or Insert > Fill > Fill Down.
    Copy/Paste:
    Select the cell containing the formula. Copy
    Select from the cell containing teh formula to the end of the column. Paste.
    Fill Down:
    After entering the formula, and pressing enter...
    Click on the column reference tab to select the whole column.
    Command click on each cell above the one containing the formula to remove it from the selection.
    When cell with the formula is the top cell in the selection, go Insert > Fill > Fill Down.
    Pick whichever is easiest.
    Regards,
    Barry

  • Sort rows by fill color?

    Is it possible in Numbers to sort rows based on the row fill color? There are only 2 colors the rows have as background (fill), and it would save time to sort based on the highlighted row. Any ideas?
    Thank you-

    I agree with jerrold.
    I will certainly not ask Apple for such a feature.
    Here is a script which may give you an efficient response.
    property columnOffset : 2
    tell application "Numbers"
    activate
    set {rName, tName, sName, dName} to my getSelection()
    if (character 2 of rName) as text > "9" then
    set columnLetter to text 1 thru 2 of rName
    else
    set columnLetter to character 1 of rName
    end if
    set twoNames to my decoupe(rName, ":")
    set {colNum1, rowNum1} to my decipher(item 1 of twoNames)
    set columnToSort to colNum1 + columnOffset
    tell document dName to tell sheet sName to tell table tName
    set myColor to background color of (get properties of range rName)
    set nbRows to count rows
    repeat with r from 1 to 14 --nbRows
    set val to background color of (get properties of range (columnLetter & r & ":" & columnLetter & r))
    set val to (val is myColor)
    set value of cell r of column columnToSort to val
    end repeat
    end tell
    end tell
    --=====
    on getSelection()
    local mySelectedRanges, sheetRanges, thisRange, _, myRange, myTable, mySheet, myDoc, mySelection
    tell application "Numbers"
    activate
    tell document 1
    set mySelectedRanges to selection range of every table of every sheet
    repeat with sheetRanges in mySelectedRanges
    repeat with thisRange in sheetRanges
    if contents of thisRange is not missing value then
    try
    --return thisRange --poorly formed result
    thisRange as text
    on error errMsg number errNum
    set {_, myRange, _, myTable, _, mySheet, _, myDoc} to my decoupe(errMsg, quote)
    --set mySelection to (a reference to (range rn of table tn of sheet sn))
    return {myRange, myTable, mySheet, myDoc}
    end try
    end if -- contents…
    end repeat -- thisRange
    end repeat -- sheetRanges
    end tell -- document 1
    end tell -- application
    return {missing value, missing value, missing value, missing value}
    end getSelection
    --=====
    on decipher(n)
    local letters, colNum, rowNum
    set letters to "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
    if (character 2 of n) as text > "9" then
    set colNum to (offset of (character 1 of n) in letters) * 64 + (offset of (character 2 of n) in letters)
    set rowNum to (text 3 thru -1 of n) as integer
    else
    set colNum to offset of (character 1 of n) in letters
    set rowNum to (text 2 thru -1 of n) as integer
    end if
    return {colNum, rowNum}
    end decipher
    --=====
    on decoupe(t, d)
    local l
    set AppleScript's text item delimiters to d
    set l to text items of t
    set AppleScript's text item delimiters to ""
    return l
    end decoupe
    --=====
    Select a cell with the color to use in the sort.
    Run the script.
    It will fill the column whose offset from the selected one is defined by the property 'columnOffset'
    If the background of the cell in the source column is the searched one the value will be 1
    if the background is not this one, the value will be 0.
    So it will be easy to use a condition.
    Yvan KOENIG (from FRANCE mardi 10 mars 2009 20:39:44)

  • Need to apply table fill color based on text content

    Totally new to Indesign-scripting – but really need a solution to this:
    I have a table
    I want to fill the table cell with a different color based on text content.
    If cell contents the text "Apple" fill color of cell should be color swatch "Red"
    If cell contents the text "Banana" fill color of cell should be color swatch "Yellow"
    Any help most appriciated!

    Hi Franke,
    Try the below code, may it will helpful:
    var myDoc = app.activeDocument
    //var myCell = app.activeDocument.textFrames.everyItem().tables.everyItem().cells.everyItem().getElement s()
    app.findTextPreferences = app.changeTextPreferences = null
    app.findTextPreferences.findWhat = "Apple"
    var myFound = myDoc.findText()
    for(i=0; i<myFound.length; i++)
        if(myFound[i].parent.constructor.name == "Cell")
        myFound[i].parent.fillColor = "aaa"
    If the above code helps you, then please give Helpful or Correct Answers.
    Because for the last 3 months only I started my Indesign Scripting Career.
    With the help of Forum legends I can able to reply for simple questions.
    Thanks all...
    Regards
    BEGINNER

  • Rules applied to multiple cells trigger color changes when any of the cells

    "Rules applied to multiple cells trigger color changes when any of the cells meet the rule’s condition." That's what Help says, but when I follow the directions, it doesn't work. This is in Numbers 08.
    I have a table where the contents of one column are either "YES" or "NO", depending on formulas using variables from other cells. If YES, I want the fill of that cell and that of two adjacent cells to change from white to green. I select all three cells and use conditional format rules for "text contains:" YES, then choose my fill color. When I return to the table and introduce values for the variables that trigger the rule, only the cell in the YES/NO column changes to green; the other two remain white.
    While I am spreadsheet challenged, I usually can follow directions as plain as those in Help, but it's not working. I couldn't find anything in the discussions after an hour of searching. Is this a known problem or am I just stupid?

    For what it's worth, that's the way I read that line in the User Guide as well. What it actually appears to mean, though is 'Rules applied to multiple cells apply independently to each of the cells."
    Here's a workaround for your three adjacent columns. Long, but fairly simple steps.
    Add a second table to the sheet (Table 2).
    Resize the second table to one column wide and as many rows as you want to apply the conditional format to.
    Set the width of the column to the same width as the three columns you want to highlight, and the row height(s) to match the rows.
    Format to table to have NO Header or Footer row or column.
    Use the Wrap Inspector to uncheck "Object causes wrap"
    In the first top cell of Table 2, enter an = sign, then Click on Table 1 in the sidebar, Click on the first cell that will hold YES or NO.
    Fill the formula down the rest of Table 2.
    With all cells in Table 2 selected, use the Cell Format inspector to set the 'text contains yes' rule and the conditional fill colour for these cells.
    Test the conditional formating by introducing values into Table 1.
    Click on Table 1 in the sidebar, then use the Table inspector to set Cell Fill to 'none'.
    Click on Table 2 in the sidebar, then drag that table onto table 1 aligning it to cover the cells in which the conditional formating is to appear.
    When positioned (and still selected), go to the Arrange menu and Send Backward to move Table 2 behind the (transparent) cells in Table 1.
    With Table 2 still selected, click on the Cell Borders color well and set the Opacity of the borders to 0%.
    Click the Text inspector and set the Text colour Opacity for Table 2 to 0%.
    Regards,
    Barry

  • How to change series or line color in excel 2007 using ActiveX

    I am trying to change series color using Excel 2007 with ActiveX as below. It seems the color cannot be controlled correctly. For example, if I chosse red color, my curve will be changed to blue. Any ideas?
    Also, I googled and found a guy ran into similiar problem using VBA for Excel 2007. See the link below:
    http://help.wugnet.com/office/change-series-line-color-excel-2007-vba-ftopict1062646.html
    Set ch = Worksheets("Chart").ChartObjects(1)
    Set objSeries = ch.Chart.SeriesCollection(1)
    objSeries.Format.Line.ForeColor.RGB = RGB(255, 127, 0)
    According to the post, it need to be done as follows
    objSeries.Border.Color = RGB(255, 127, 0) . But I cannot find the border property/method in ActiveX.
    The color seems to be abitrary. and I found the 

    Xubuli,
    I looked into your question and confirmed that Border.Color is not located under the Excel.Series library. Instead, you must locate it under _Worksheet.UsedRange as seen below in the figure. I am attaching the VI file where I located the the Border.Color property node, and I am also including a SubVI on the block diagram that goes into explicitly set the cell color and border. This SubVI can be found under Programming>>Report Generation>>Excel Specific>>Excel Format>>Excel Set Cell Color and Border.vi, if you have the Report Generation Toolkit installed. I hope this helps.
    Larry H
    Applications Engineer
    National Instruments
    Attachments:
    CellBorder.vi ‏8 KB

  • What happened to the range of cell fill colours in Numbers v3?.  Can I get them back?

    I've just upgraded to Mavericks and the latest version of numbers has the cell fill box on the right hand side margin.  The colour box has a much smaller range of colours.
    I'd like to put those tools back on the top bar with the original colour range.  Is this possible?

    Ella,
    I don't know how to add a tool to the toolbar. I have found that you can get the Colors Pane to display by clicking on the little color pane symbol as shown below (I don't know what to call that control).
    Jerry

Maybe you are looking for

  • HT4137 how do i unlock an ipod but i dont know the passcode

    how do i unlock an ipod but i dont know the passcode

  • Palm & Outlook 2010

     I LOVE my old Palm Z22.  Love it, love it.  Have kept it with all my Windows & Office upgrades - but now I've got Outlook 2010, and it won't work!  Do I wait and hope for a new patch?  Is there a solution in sight? Post relates to: Palm Z22

  • Topics opening in new window

    I've run across several posts on how to make a topic open in a new window, but I have the opposite problem. I don't want my topics to open in a new window, but they are. I have a master project with several child projects merged into it. The Contents

  • Why can't Weblogic 12c find Managed Bean by annotation,which in a jar?

    the detail: why can't Weblogic 12c find Managed Bean by annotation,which in a jar?

  • Writing java bean class?

    Hi All, In my scenario,I am getting all pagelevel details from the database. I mean Suppose in my web application 10 pages are there.for 10 pages, all details (like page title,button names,page header etc) based on user.per user it will vary .Some bo