Txt文件数据操作. [英] Txt File data Manipulation.

查看:58
本文介绍了Txt文件数据操作.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


有谁知道如何在文本文件中添加/添加一些数据/文本...?这里的情况是:写入文本文件后,您将在一段时间后将其关闭,然后再次打开它,并在其上添加/添加一些数据/文本...

示例:文本文件包含-

胡安·德拉克鲁兹
戈格·布莱克

我将在其上添加"Danilo Condes",因此输出应为:

胡安·德拉克鲁兹
戈格·布莱克
达尼洛·孔德斯

如果您有任何建议可以帮助/解决问题,请.帮帮我...任何建议将不胜感激....感谢

Hi,
Is anyone know how to add/append some data/text in a text file...??? the situation here is: After writing of the text file you will close it after a while you will open it again and you will add/append some data/text on it...

Example : The text file contains-

Juan de la Cruz
Goerge Black

i will add "Danilo Condes" on it so the out should be:

Juan de la Cruz
Goerge Black
Danilo Condes

Please if you have any suggestion that might help/solve the problem. Help me...Any suggestion will be appreciated....Thanks

推荐答案

openAppend
一起使用
Use open with an Append
Dim intFileHandle As Integer
Dim myStr As String
myStr = "Hello World"
intFileHandle = FreeFile
Open "myFile.txt" For Append As #intFileHandle
Print #intFileHandle, myStr
Close #intFileHandle


这篇关于Txt文件数据操作.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆