Results 1 to 3 of 3
  1. #1

    Excel Import problem

    I've searched around for an answer but this doesn't seem to be mentioned on other posts.

    I have an excel file that contains data under column headings. The file is attached to my script using File>Settings>Resources method, and the tab name is 'Global' so QTP can iterate through the rows automatically. I have written some VB that matches the on screen Terminal Emulator field to the column header in the datasheet and if there's data in the cell inputs it into the field.

    The issue I have is when the excel file is launched with the script any characters such as "-" are stripped so do not match the on screen field description.

    Does anyone know a workaround to stop QTP stripping non alphanumeric characters out of my column headings?


  2. #2

    Re: Excel Import problem

    I do not expect a direct workaround. If you double click for example a column header in the data table in qtp an try to enter something like "test-123" you will get an error message and the column name will be converted to "test123".

    You will probably have to write a function that strips the special characters and then uses the column name without the special characters to adress the column header.

  3. #3

    Re: Excel Import problem

    Thanks Tom.

    Trouble is I use descriptive programming to create the object using the column header as the "attached text" property, so the field name on the screen and the column header name has to be exactly the same (Mainframe - don't ask!).

    If there is no other way round it then im going to have to do a huge amount of processing stripping the chars out the captured string, then matching to my column headers then using the original string to create the object to input the data!



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
BetaSoft Inc.
All times are GMT -8. The time now is 05:59 PM.

Copyright BetaSoft Inc.