Results 1 to 3 of 3

Thread: [RESOLVED] Extra Character on excel output

  1. #1

    Thread Starter
    PowerPoster kfcSmitty's Avatar
    Join Date
    May 2005
    Posts
    2,248

    Resolved [RESOLVED] Extra Character on excel output

    This technically isnt a VBA question, but LotusScript is very similar to VBA.

    I have an excel spreadsheet, and I am pulling several fields of data out of it.

    Once I have read it in, it writes it to another excel sheet, and does some other stuff that really isnt important.

    The problem I am having is that it throws an extra character (the little box thing) on the end of the e-mail address. I have checked the original file, and no character or blank space is present.

    To raise further question, I am printing all fields with the same code:

    VB Code:
    1. For x =0 To 9
    2.         xlWs.Range("A1").OffSet(rowCount,x).value = Fulltrim(inputArray(x))
    3.         xlWs.Range("A1").OffSet(rowCount,x).font.bold = True
    4.     Next

    But only the e-mail is printing with this error. I have tried removing the last character, but it presents problems since none of the other fields have this character.

    Does anyone know a replace function that will search for this? Or perhaps a workaround? Or maybe someone has had a similar problem?

    As of now, I am simply removing the final character when the loop is on its final itineration..But i'm not a fan of throwing random If statements in to fix my problems.


    Any help would be appreciated on this.


    Thanks,

    Smitty

  2. #2
    Frenzied Member DKenny's Avatar
    Join Date
    Sep 2005
    Location
    on the good ship oblivion..
    Posts
    1,171

    Re: Extra Character on excel output

    have you tried the Excel built-in Clean function? It should remove all non-printable chars.
    It can be called by Application.WorksheetFunction
    Declan

    Don't forget to mark your Thread as resolved.
    Take a moment to rate posts that you think are helpful

  3. #3

    Thread Starter
    PowerPoster kfcSmitty's Avatar
    Join Date
    May 2005
    Posts
    2,248

    Re: Extra Character on excel output

    Thanks a million. That worked like a charm.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width