# variable used to store the path of the source CSV file
$sourceCSV = <path of source CSV> ;
# variable used to advance the number of the row from which the export starts
$startrow = 0 ;
# counter used in names of resulting CSV files
$counter = 1 ;
# setting the while loop to continue as long as the value of the $startrow variable is smaller than the number of rows in your source CSV file
while ($startrow -lt <total number of rows in source CSV>)
{
# import of however many rows you want the resulting CSV to contain starting from the $startrow position and export of the imported content to a new file
Import-CSV $sourceCSV | select-object -skip $startrow -first <number of rows in resulting CSV> | Export-CSV "<resulting CSV filepath>$($counter).csv" -NoClobber;
# advancing the number of the row from which the export starts
$startrow += <number of rows in resulting CSV> ;
# incrementing the $counter variable
$counter++ ;
}
1条答案
按热度按时间nxagd54h1#
根据您使用的操作系统:
对于Windows,您可以使用followingPowershell脚本:
对于Unix和衍生版本,您可以使用split命令
或者,你可以选择i.e. HTTP Simple Table Server,在这种情况下,您将不必拆分文件,并且您将能够将其加载到一台机器上,并通过HTTP提供给从属设备。HTTP Simple Table Server可以使用JMeter Plugins Manager安装