Cisco ACI 生成Postman CSV 脚本场景

Cisco ACI 生成Postman CSV 脚本场景

1> 利用 EXCEL 根据H列的数字,向下按指定Step 填充

以下为按3为step进行递增

在D2输入公式后,下拉

复制代码
="eth1/"&INDIRECT("h"&INT((ROW(A1)-1)/3+1))

示例如下:D列为递增

2> excel vba将选中区域向下复制指定次数

场景 :当有50个接口时,每个接口的EPG有70个,那么需要这70个vlan向下填充50次,如果手工向下复制很容易出错,

使用下面的VBA脚本就可以简单实现。

  1. 选中要向下填充的数据

  2. 键盘F5,运行脚本,在弹出的对话框中填上要重复向下填充的数字,比如49

Sub CopySelection()

Dim numCopies As Integer

Dim selectedRange As Range

Dim i As Integer

' Prompt the user to enter a number

numCopies = Application.InputBox("Enter the number of times to copy the selection:", Type:=1)

' Check if a valid number is entered

If numCopies <= 0 Then

MsgBox "Please enter a valid positive number.", vbExclamation

Exit Sub

End If

' Store the selected range

Set selectedRange = Selection

' Copy the selection downwards the specified number of times

For i = 1 To numCopies

selectedRange.Offset(i * selectedRange.Rows.Count, 0).Value = selectedRange.Value

Next i

MsgBox "Selected range copied " & numCopies & " times.", vbInformation

End Sub

相关推荐
小王的饲养员10 小时前
Apipost 与 Apifox 数据库功能对比:深入解析与应用场景分析
大数据·数据库·人工智能·后端·postman
sunshine__sun1 天前
web网页用postman调用接口测试(超简单方法)
测试工具·postman
好奇的菜鸟2 天前
在 Postman 中高效生成随机环境变量的完整指南
测试工具·lua·postman
Apipost的同学们2 天前
AI时代的接口自动化优化实践:如何突破Postman的局限性
后端·ai·架构·postman·自定义函数·apipost·api+ai
鱼鱼说测试3 天前
postman测试文件上传教程
测试工具·postman
MYians7 天前
[Windows]Postman-app官方历史版本下载方法
测试工具·postman
Small black human8 天前
HTTP-Postman的安装及其使用
测试工具·postman
草履虫建模10 天前
Postman - API 调试与开发工具 - 标准使用流程
java·测试工具·spring·json·测试用例·postman·集成学习
WIN赢20 天前
PostMan使用
测试工具·lua·postman