Get the App
SLTechnology News&Howtos  ›  Development  › 

How to use VBS to split text

Shulou Source: shulou.com Published: 2022-06-03 06:48:15 10月05日 Update

This article mainly shows you "how to use VBS to split text", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "how to use VBS to split text" this article.

The code is as follows:

On Error Resume Next

'Code By NetPatch

Set Arg=Wscript.Arguments

If Arg.Count=0 Then Wscript.Quit

Set Fso = CreateObject ("Scripting.FileSystemObject")

Set Conn = CreateObject ("ADODB.Connection")

Set Rs = CreateObject ("ADODB.Recordset")

Path=left (Arg (0), InstrRev (Arg (0), "\"))

Fname=replace (Arg (0), path, "")

ITunes 0

Conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & path& "; Extended Properties="text;HDR=NO;FMT=Delimited"

'Rs.Open "Select count (*) FROM" & Fname,_

'Conn, 3, 3, & H0001

'allline=rs (0)

Rs.Open "Select * FROM" & Fname,_

Conn, 3,3, & H0001

'MsgBox rs (0). Name

Do Until Rs.EOF 'NRAPHER P

Number of rows to be split by Do Until nim5000'

Set MyTables = fso.CreateTextFile (arg (0) & I & ".txt", true)

MyTables.WriteLine Rs.Fields.Item (0). Value

Rs.MoveNext

N=n+1

Loop

MyTables.Close

Set MyTables = Nothing

Nasty 0

I=i+1

Loop

Rs.Close

Conn.Close

Set fso = Nothing

Set Rs = Nothing

Set Conn = Nothing

Wscript.echo "tidied up!"

The above is all the content of the article "how to use VBS to split text". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Tags: Text content articles learning help code easy to understand more organization knowledge editing industry information information channels channels research Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MySQL vpn OPPO Reno Shulou Technology Microsoft