VBA TextStream扩展 [英] VBA TextStream Extensions
问题描述
我正在转换一组C例程,将相同的数据放入Excel电子表格中。 C可以将文件指针移回。 是否有使用textstream对象的类似函数?
I am converting a set of C routines to put the same data into a excel spreadsheet. C has the ability to move the file pointer back. Is there a similiar function using the textstream object?
objTextStream.Read(-1)给我一个错误,告诉我这不能简单地做到这一点。 有没有办法从VBA移动文件指针,或者最好将C代码转换为DLL然后通过VBA / DLL调用相同的函数?
objTextStream.Read(-1) gives me an error showing me this can not be done this simplistically. Is there a way to move the file pointer from VBA or would it be best to convert the C code to a DLL and then call the same functions via VBA/DLL?
如果我要去转换DLL如何返回指向文件的指针?
If I am going to convert the DLL how do I return the pointer to the file?
谢谢。
推荐答案
嗨K。,
感谢您在MSDN论坛上发帖。
Thanks for posting in the MSDN Forum.
似乎没有任何功能可以在TextStream对象中执行您想要的操作。但是这里存在FSO对象中的Seek函数。
It seem have no function can do what you want in TextStream object. However here exists Seek function in FSO object.
祝你有个美好的一天,
Tom
这篇关于VBA TextStream扩展的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!