Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use VBS to split text

2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

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!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report