本文介绍了当我们必须使用loadrunner读取数据时,如何处理csv中带有逗号的字符串?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我使用Loadrunner时,它可以从csv文件读取数据.众所周知,csv文件用逗号分隔.

When I used Loadrunner, it can read data from a csv file. As we know , csv file is separated by a comma.

问题是,如果csv中的参数本身带有逗号,则该字符串将被分成几个段.那不是我想要的.

The question is, if the parameter in csv has comma itself, the string will be separated to several segments. That is not I want to get.

如何获取带有逗号的原始数据?

How can we get the original data with comma in it?

推荐答案

当数据带有逗号时,请使用转义字符将数据存储在参数中.例如,如果名称为"Smith,John",则可以将其以Smith \,John的形式存储在Loadrunner数据文件中.

When data has a comma, use an escape character to store the data in the parameter.For example, if the name is 'Smith, John', it can be stored as Smith\, John in the Loadrunner data file.

这篇关于当我们必须使用loadrunner读取数据时,如何处理csv中带有逗号的字符串?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-13 15:14