LAE

Welcome to the LAE community!  Please feel free to start a discussion in the discussion tab or join in a conversation.

Discussions

Members

Resources

Events

 View Only
  • 1.  Error Saving to Excel from .brd

    Employee
    Posted 07-31-2012 13:40

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: Cindy

    I am having a problem saving some files to EXCEL from the BRD file. One of the columns is a comment field that often contains a character that causes this operation to fail. I have tried to find and replace that character, but that is not working for me. The message I get is--Unable to access file for writing: C:\xxx.... ('unicodeescape' codec can't decode byte 0x5C in position 37: \ at end of string). Is there another strategy for cleaning this character so I can save the file as EXCEL?


  • 2.  RE: Error Saving to Excel from .brd

    Employee
    Posted 07-31-2012 22:47

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: stonysmith

    Try adding a filter in front of the Excel node that converts that column to a string instead of leaving it unicode:


    emit *
    override emit comment=str(comment)


  • 3.  RE: Error Saving to Excel from .brd

    Employee
    Posted 08-02-2012 14:32

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: stonysmith

    Here's another thing to try in a filter:

    emit *
    override emit comment=comment.replace("\\","")

    Note: I've been unable to replace the error message using Brain 4.5.4.
    It seems that this may have been properly dealt with in the patches.


  • 4.  RE: Error Saving to Excel from .brd

    Employee
    Posted 08-28-2012 08:07

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: gregroeper

    Hey

    I get a similar message writing to Excel, but I wish to preserve the Unicode characters in the excel file not remove them. When I use "Copy as Excel" and paste it into a spreadsheet it works fine, but when I try using the excel output node I get this - " 'ascii' codec can't decode byte 0xbf in position 23: ordinal not in range(128)"

    The string it seems to choke on is this:
    Seniors��-South

    Suggestions?

    Greg


  • 5.  RE: Error Saving to Excel from .brd

    Employee
    Posted 09-04-2012 10:57

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: rboccuzzi

    I'm not sure this will help, it isn't clear to me if your field is currently a string or already a unicode. Try converting it from string to unicode:

    newFieldName = unicode('oldFieldName')
    emit newFieldName as "oldFieldName"

    Cheers
    Rich