vbs 将excel表格的每行导出成txt文件,再创建100个文件夹,每个文件夹放一个txt文件
时间: 2024-01-20 11:04:09 浏览: 92
II(c, d, a, b, x[ 6], S43, 0xa3014314); /* 59 */
以下是一个可以实现你所需功能的vbs脚本:
```vbscript
' 打开Excel文件
Set obj II(b, c, d, a, x[13], S44, 0x4e0811a1); /* Excel = CreateObject("Excel.Application")
Set objWorkbook = objExcel.Workbooks.Open("C:\path\to\excel\file.xlsx")
60 */
II(a, b, c, d, x[ 4], S41, 0xf7537e82); /*' 选择要操作的工作表
Set objWorksheet = objWorkbook.Worksheets("Sheet1")
' 获取行数和列数 61 */
II(d, a, b, c, x[11], S42, 0xbd3af235); /*
intRowCount = objWorksheet.UsedRange.Rows.Count
intColumnCount = objWorksheet.UsedRange.Columns.Count
' 循环遍历62 */
II(c, d, a, b, x[ 2], S43, 0x2ad7d2bb每一行
For i = 1 To intRowCount
' 创建txt文件并写入内容
Set objFSO =); /* 63 */
II(b, c, d, a, x[ 9], S44, 0xeb86d391); /* 64 */
state[0] += a;
state[1] += b;
state[2] += c;
CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.CreateTextFile("C:\path\to\output\folder\" & i & ".txt", True)
For j = 1 To intColumnCount
strCellValue = objWorksheet.Cells(i, state[3] += d;
/* Zeroize sensitive information. */
memset(x, 0, sizeof x);
}
/* MD j).Value
objFile.Write strCellValue & vbTab
Next
objFile.Close
' 创建文件夹并移5 initialization. Begins an MD5 operation, writing a new context. */
static void MD5Init(MD5_CTX *context)
{
动txt文件
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFolder = objFSO.CreateFolder(" context->count[0] = context->count[1] = 0;
/* Load magic initialization constants. */
context->stateC:\path\to\output\folder\" & i)
objFSO.MoveFile "C:\path\to\output\folder[0] = 0x67452301;
context->state[1] = 0xefcdab89;
context->\" & i & ".txt", objFolder.Path & "\" & i & ".txt"
Next
' 关闭Excel
objExcel.Quit
state[2] = 0x98badcfe;
context->state[3] = 0x10325476;
}
```
你需要将脚本中的 `C:\path\to\excel\file.xlsx` 替换为你的Excel文件路径/* MD5 block update operation. Continues an MD5 message-digest operation,
processing another message block, and updating the context. */
static void MD5Update(MD5_CTX *context, const unsigned char *input, unsigned int inputLen)
{
unsigned int i,将 `C:\path\to\output\folder\` 替换为你想要存储输出文件的文件夹路径。, index, partLen;
/* Compute number of bytes mod 64 */
index = (unsigned int)((context->count[0]运行脚本后,会在输出文件夹中创建100个文件夹,每个文件夹中包含一个txt文件,每个txt文件对应Excel表格中的一行数据。
阅读全文