Need to Format Variables Correctly - Printable Version +- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums) +-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP) +--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners) +--- Thread: Need to Format Variables Correctly (/Thread-Need-to-Format-Variables-Correctly) |
Need to Format Variables Correctly - MichaelS - 11-15-2011 I am comparing two sorted excel files "acct" and "Crystal" and merging there contents into a third. I sorted the two excel files on two common fields in each. - Account number and and amount. I am trying to compare these two fields to see if there are differences between the two excel files, but the format I am getting is not the same that was use to sort the columns in the excel files. I would like the amount fields fixed and the account field to have leading zeroes so that the compare determines if there if found an extra accouting or crystal records and increments accordingly. The amount field shows 0000001924.00 in excel, but the variable that I assigned from the cell had "1924". The Account field has leading zeroes and shows as such in excel, but the var does not have a leading zero. Can this be done or should I approach this problem differently? Code: Do until EndofBothFiles = true |