OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Read data from a remote file

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
paperjam
General User
General User


Joined: 10 May 2005
Posts: 24

PostPosted: Thu Mar 23, 2006 6:47 am    Post subject: Read data from a remote file Reply with quote

I am trying to read data from a remote file into a string. I succeed in downloading the data into a byte array with this code:

Code:
Dim oFileAccess, oFile
Dim aData() as Variant
oFileAccess = createUnoService("com.sun.star.ucb.SimpleFileAccess")

oFile = oFileAccess.openFileRead("http://localhost/")
oFile.readBytes(aData(), oFile.length())


My problem is that I do not know how to convert the byte array to a string. I would be glad if somebody could help...

Thanks,
Paperjam
Back to top
View user's profile Send private message Visit poster's website
paperjam
General User
General User


Joined: 10 May 2005
Posts: 24

PostPosted: Thu Mar 23, 2006 7:18 am    Post subject: Reply with quote

I just found the answer here: http://www.oooforum.org/forum/viewtopic.phtml?t=7063 :-)
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group