Skip to main content

Posts

Showing posts from October, 2012

QTP - Get multi line data from Excel Cell

Today I am going to write a simple topic on excel and it seems very simple but lot of automation testers in need of this topic. Say I want to have multiple data on a single cell(using ALT+ENTER). This will solve the purpose as well as maintenance easy.  Ok, How to get that data from excel and separate the data which was enterted using ALT+ENTER. Just get the cell data and replace the string for vbLF with "" (Empty String) and you can pass your data. Normally new line indicates vbCRLF (Chr(13) + Chr(10)) but in excel new line char is Char(10) i.e. only vbLF not vbCR or vbCRLF. Hope this will help you guys !!!