Alternating text color of excel cell items after each space?

Hello. I have a script that emails a table of info which works fine and that looks like this:
name, samaccountname, date, memberof
In the email table I was able to have it do a line break on each space so that the memberof groups are on on separate lines for easier reading.
Well I've been wanting to send the data to store in a csv sheet as well. I can get it going in there but for the member of column it puts in memberof1  memberof2  memberof3 etc etc on one line. The CNs OUs etc are all removed and its just the group
names separated by spaces. Works but a little hard to read.
I was thinking maybe there was a way to open the excel file for writing and on that one column have it alternate text colors using the space as the delimiter? Everything would be easier to read that way. Is this possible ?
Thanks

Thanks. I did look at that and have this so far. Im  just trying to echo it out right now, but Im guessing that somehow in the foreach ($item in $groups) I need to create an array or something? Then Id want to apply one color to each item in the array.
Ive tried several different combinations and was trying $item.spli(" ") but it always comes back looking the same.
So right now $item echos like this
Group1  Group2  Group3  Group4  Group5
Id just want to alternate each space delimited item one of two colors. Then take those appened colors of each item and write it back to the cell that I read it from in the column so that its easier to read. Is this even possible?
$objExcel = new-object -comobject excel.application 
$objExcel.Visible = $True
$ExcelFilesLocation = "c:\"
$UserWorkBook = $objExcel.Workbooks.Open($ExcelFilesLocation + "groups.csv")
$UserWorksheet = $UserWorkBook.Worksheets.Item(1)
$intRow = 2
Do {
 # Reading the first column of the current row
 $groups = $UserWorksheet.Cells.Item($intRow, 4).Value()
 foreach ($item in $groups)
 $regex = [regex] "\s"
 $split = $regex.split($item)
 Write-Host $split
 # Move to next row
 $intRow++
 While ($UserWorksheet.Cells.Item($intRow,1).Value() -ne $null)

Similar Messages

  • Hello all, How do I enter two lines of texts from a excel cell to a illustrator text frame?

    Problem is , if I have a text in excel column as " line1 'alt ENTER' line 2 " and if I read this text using VBAscript and write it back to illustrator, it appears continuously like "Line1Line2" the line break does not happen.
    Mark Mcclure, please help me on this.
    First PNG shows the Excel column entry and the second shows the output u got in Illustrator and the third shows the script I am using to do this read from excel and write to illustrator.

    I don't understand your question, here's a sample on a way to enter 2 lines in illustrator, it has nothing to do with excel, you have to adapt it
    Sub multilineToIllustrator()
        Dim iapp As New Illustrator.Application
        Dim idoc As Illustrator.Document
        Dim iframe As Illustrator.TextFrame
        Set idoc = iapp.ActiveDocument
        Set iframe = idoc.TextFrames.Add
        For a = 1 To 2
            iframe.Paragraphs.Add "line " & a
        Next
        Set iframe = Nothing
        Set idoc = Nothing
        Set iapp = Nothing
    End Sub

  • Putting cell border after each group

    I have 3 groups invoices, on account credits and on account receipts groups. In invoices group contain another group which is the application of the invoices. I want that every end of each invoices, will put a cell bottom border. And after the entire invoice group i will again put a cell bottom border to some of the columns.
    Need your help. if you want i can upload the xml output and xml template i have.
    Thank you so much.

    i cant upload files here but if anybody is interested i can send the files to you. really appreciate if somebody can help me.

  • Change submenu text color

    How would I go about changing the text color of the submenu items without changing the text color of the main menu items?

    Add the following style rule to your document
    ul.MenuBarHorizontal ul a {
        color: red;
    changing the colour to suit.

  • I need help highlighting an expiration date on my Numbers '09 spreadsheet. I want the text/fill of a cell to change color when the expiration date of an item is within 180 days of the current date.

    I need help highlighting cells on my Numbers '09 spreadsheet.  I want the cell text/fill to change color when the date is 180 days or less from the current date.  I already have a cell with the current date in it.  I also know how to change the fill/text colors.  All the cells have been formatted to show date only.  I am having trouble with the formula.  I can get to the Conditional Formatting menu and select "With Dates" but after that I am lost.  Can anyone help?
    Thank you for any assistance.
    B

    Set a Conditional Format rule as shown in the illustration below. The rule has been applied to all dates in column B of the table.
    Regards,
    Barry

  • Help needed with referencing single Excel cells and formatting resulting text

    In InDesign CS5 I am putting together a 20pp catalogue of about 200 products. The plan is to have the product information, SKU code, quantity etc fixed, but have the prices (there are two i.e. pack price and individual price) being linked to an Excel spreadsheet. This is so that the prices can be updated in the Excel file and the InDesign file will pull the new prices through. In case you are wondering why I don't pull the whole set of information through, this is because there are a lot of copywriting changes done to the information once it's in InDesign - it's only going to be the prices that will be updated.
    I am planning on having two single cell tables in their own text frame, duly formatted with cell style, table style and paragraph style for the two price variables. This I am then going to have to repeat 200 times making sure I link to the next row down in Excel. This is going to be a hideous task but I see know way of modifying the cell in InDesign to point it to the next row in Excel. That's my first problem.
    My second problem is this. In the Excel sheet, the prices are formatted as UK currency and are therefore like this...
    £2.00
    £0.40
    £1.43
    £9.99
    £0.99
    £0.09
    What I will require is once I import that data (and refresh the data via a newly saved Excel file) is that the prices end up like this...
    £2.00
    40p
    £1.43
    £9.99
    99p
    9p
    So if the value is lower than £1.00 it needs a trailing 'p' added  and the leading zero and '£' sign stripped off. If the value is lower than £0.10 it also needs the zero after the decimal point stripping off.
    Then formatting wise, the '£' sign needs to be superscripted and the same for the 'p'. This I am assuming could be done via GREP?
    In summary, can anyone help with the first task of referecing the Excel cells on a cell by cell basis, given that it is the same cell column each time, but the next row down, and also point me in the right direction of the price formattting issues.
    Any help will be gratefully received.

    I would do this:
    Create on line with the formatting.
    Export as InDesign tagged text (TXT)
    Read out these tags
    In Excel exists a function to connect text from several cells and predfined text, there connect the content from cells with the paragraph styling tags. Do it in a seperate sheet. (Better would be to use a database like Access, there you can link your Excel sheet).
    Export this sheet as txt file
    Place this sheet as tagged text (there is an option in one of the sialog boxes).
    In preferences  < file handling you can specify that Tablecalculation Sheets and text is not embedded but linked, turn it on.

  • Excel cells colors by labiew 2009

    Hi,
    I have an application. Where in i have to change the colors of Cells in Excel as per the result after doing some manipulations on my data. Exampe
    : if true then color to green and if False then color to Red.
    I use Labview2009, Microsoft office 2007. and i am little confused, whether there is any module report generation toolkit for ms office, to use with Labview 2009.
    Thanks in advance

    Ofcourse you have. In Report generation toolkit you have a vi called Excel Set Color and Border.vi with this you can set the color of the cell.
    The best solution is the one you find it by yourself

  • I can't read the text on my toolbar after changing personas, and unchecking "use text color" doesn't do anything even if I change personas.

    Several personas come with unreadable text and accent color. This article explains how to resolve the issue:
    http://support.mozilla.com/en-US/kb/Cannot+read+text+after+selecting+a+Persona
    However, when I followed the directions, the text colors did not stay the same as I switched personas.

    If you have installed a persona then the default text color and background color of the toolbars are defined by that persona.<br />
    The colors of the currently selected persona are stored as the first entry in the pref <b>lightweightThemes.usedThemes</b> as textcolor and accentcolor.
    You can edit that pref and set another value for the "textcolor":"#ffffff" part (e.g. "textcolor":"#000000").
    See also http://kb.mozillazine.org/about%3Aconfig

  • Work with JTable cell (check input, set text color)

    I have a JTable with data
    The task is:
    User inputs some data into cell
    I want to check his input string for equatily with other values in column
    For example, I have these values in column:
    1.example
    2.exercise
    3.execute
    User inputs word "execution" in the same column
    until user inputs "executi" his input string should be red.
    What event I have to listen to if I want to get user input string?
    Also a question:
    Is there any opportunity to work with cell row (copy it to another JTable) ?
    Message was edited by:
    Holod

    i think you should use cell editor as textfield (although that is default for jtable) and then implements document listener and set text color in insert update method.
    try this out :-)

  • Jasper Export to excel: changing background color of the cell/field

    Hi all,
    I have designed a report containing a set of 5 different fields. All these are STRING values.
    Among these are two fields named: BUDGETED and ACTUAL.
    I want to show the data corresponding to ACTUAL in red color if the value of ACTUAL is greater than BUDGETED when exported in excel format.
    The value itself should be displayed in red color or the excel cell should have a color red
    Can someone please help me in this? How can we implement the logic to compare these two values?
    Thanks in advance.

    You are using Jasper and you thought: hey, let me post a question in the Oracle Reports forum?

  • Background color of the cell in EXCEL not working....Pls help..

    Hi gurus,
    I have written a procedure to change the background color of the cell in EXCEL.The code is as below..
    PROCEDURE set_header     (p_row IN NUMBER, p_col IN NUMBER, p_value IN VARCHAR2, p_border IN VARCHAR2 DEFAULT 'N',p_bgcolor IN VARCHAR2 DEFAULT 'N') IS
    BEGIN
         v_args     := ole2.create_arglist;
         ole2.add_arg(v_args, p_row);
         ole2.add_arg(v_args, p_col);
         v_cell     := ole2.get_obj_property(v_worksheet, 'cells', v_args);
         v_font     := ole2.get_obj_property(v_cell, 'font');
         ole2.set_property(v_font, 'fontstyle', 'bold');
         ole2.set_property(v_font, 'size', 9);
         ole2.destroy_arglist(v_args);
         if p_border = 'Y' THEN
              v_border := ole2.get_obj_property(v_cell, 'Borders');
              ole2.set_property(v_border, 'LineStyle', 1);
              ole2.release_obj(v_border);
         End If;
         if p_bgcolor ='Y' THEN
              v_bgcolor := ole2.get_obj_property(v_cell,'Bgcolor'); --This is not woking
              ole2.set_property(v_bgcolor,'bgcolor','red');
              ole2.release_obj(v_bgcolor);
         End If;
              ole2.set_property(v_cell, 'value', p_value);
              ole2.release_obj(v_cell);
         END set_header;
    Pls tell me how to change the backcolor and forecolor in the cell...
    Thanks

    The background color is set for the "Interior" object of the selected cells (Range).
    Try something like this (haven't tested it):
    v_interior := ole2.get_obj_property(v_cell,'Interior');
    ole2.set_property(v_interior,'ColorIndex',3); --should be red
    ole2.release_obj(v_interior);
    If the Foreground color = Font Color then
    ole2.set_property(v_font,'ColorIndex',6); --should be yellow
    Gerald

  • Number format changed after opening a plain text file in Excel

    Hi,
    I have an urget need to understand about how to open a plain text file in Excel with numbers displayed as is. The text file is tab delimited. Right now, extra digits (0, or 00 ) are added. For example, 31:16 from text file is displayed as 31:16:00,
    15:0 becomes 15:00, 6:5 becomes 6:05. How to display the numbers as they are in the original text file?
    Thank you very much for the help.
    Amy

    This is a annoying problem.
    Excel will try to guess the data type if you leave the cell formatting as general.This happens a lot with specific numerical entries that could be confused as dates.e.g. 12:0,1-5 etc.Unfortunatley We can't tell Excel to stop reading it as a date, but what you
    can do is tell it to display the date how you want it.
    In addtion,in order to avoid confusion and keep track of troubleshooting steps, we usually troubleshoot one issue per thread. So if you need any further help, please create a new post.Thanks for your understanding.

  • Displaying file from text item after browsing

    hi, how would i display the directory of the file in the text item after i browsed it in windows?
    thanks,
    Majic

    This works...
    DECLARE
    filename VARCHAR2 (200);
    BEGIN
    :SYSTEM.message_level := 25;
    filename :=
    GET_FILE_NAME (directory_name => 'D:\My STAFF\My Pictures\',
    file_filter => 'jpg'
    :block3.text_item4:=filename;
    IF NOT FORM_SUCCESS
    THEN
    MESSAGE ('Unable to read file(The problem may be the format ) "' || filename || '"');
    RAISE form_trigger_failure;
    END IF;
    :SYSTEM.message_level := 0;
    END;
    Just simplify little bit the code....
    Greets

  • How to export long formatted text from SAP to an excel Cell

    I have created an object(ZMM_TXT_PD) and an ID(Y01) using se75 transaction.
    With a Z program a store some lines in STXH table with object ZMM_TXT_PD and ID Y01.
    These texts are very long and formmated.
    Now I need another Z program in order to download all the stored texts in an excel file.
    I have a program which is able to download an internal table to an excel. The problem is that
    it only works with short texts. How could I download a long text that I get using READ_TEXT function
    into an excel cell?
    READ_TEXT returns an internal table like this:
       i_tline   TYPE  STANDARD  TABLE  OF tline.
    Thanks in advance.

    Hi,
    Use the following link for exporting formatted data into excel
    http://saptechsolutions.blogspot.com/2012/01/send-email-of-xml-format-data-as-excel.html

  • Typewriter tool - text color after entry fades from color selected?

    I have followed all the other directions for preferences, properties and have sucessfully set those however - after entering any text in any color - say red. or black after the enter button is pressed and i've moved anywhere else in the document - the text color is displays and prints in a faded version. How can this be corrected?

    I am also having the same issue with Acrobat X Standard.  When I use the typewriter tool in any new or existing PDF and add text in any color or font face when I mouse out to any part of the document the added text fades as if the opacity was being lowered so it's much lighter color than it should be.  
    I am using:  Windows 7 Pro 64-bit and have local admin rights.
    I've checked the Perferences > General section to ensure I am only using certified Adobe Plugins and forced Acrobat to rewrite the folder in  " %appdata%\Adobe\Acrobat\10.0\ " without any resolution.  The new 10.0 folder does not contain the Perferences folder inside either. 
    I went a step further and renamed all the Acrobat folders in my user profile in Local, LocalLow, and Roaming then ran Repair for Acrobat X Standard, rebooted computer, then open Acrobat back up with the same text fading issue when using the typewriter tool. 
    I created another new user with local admin rights but the typewriter tool does not fade the text there at all when loses focus.   Short of transfering to that new profile anyone have any other ideas to resolve this issue?

Maybe you are looking for

  • Mini (2009) and Mini-DVI to video (s-video) does not work?

    Before I return the mini and adapter I just need to confirm what I've read in other threads. The Mini-DVI to Video adapter is useless with the latest Mac mini's. And there is really no simple way to get s-video or composite video from the newest mini

  • ITunes 10.6 Windows

    iTunes crashes after selecting "app store"

  • My I Cloud is not working

    I need help my friend deleted my history on my Ipod and now when i try to log into facetime, itunes, etc. it tells me incoorect appleID password. also when i go into my settings on my ipod and go to icloud it tells me authentication failed and it is

  • Call Template Editor in LabVIEW

    Is it possible to call template editor in LV? I searched around and found using command prompt is asolution, but is there any VIs or a combination of VIs that can realize this function in new version Labview? Following is the link that calling templa

  • Power Map and internet connectivity

    Hi, after I installed Power Map I've got an error «Power Map encountered an error and cannot be launched. Please check your internet connectivity and try again» but map in Power View in the same file works fine Please, help me