View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
NickHK NickHK is offline
external usenet poster
 
Posts: 4,391
Default Storing XML In Workbook

Ray,
Not sure I follow.
If you want to work with data the XML file contains, you can open, edit,
save in Excel 2002 and up.

If you mean you need the string of text that makes up the XML file, you can
pull the whole thing into a string:
According to help, a variable length string can contain "approximately 2
billion (2^31) characters".

Dim XMLFile As String

Private Sub CommandButton1_Click()
Dim FileNum As Long

FileNum = FreeFile

Open "C:\YourXMLFile.xml" For Input As #FileNum
XMLFile = Input(LOF(FileNum), #FileNum)
Close #FileNum

Debug.Print XMLFile

End Sub

Or dump the text to a worksheet.
Or read it line by line with LineInput instead

NickHK

"Ray Price" wrote in message
...
This does not work since it will not let me export it again.

It it meta data, but I can't store it in a custom property OR a cell

because
the xml string is too long. Is there nowhere in excel with unlimited

string
lengths?

"NickHK" wrote in message
...
Ray,
Excel 2002 and up can open/save XML files directly. You could hide it
after
opening.

NickHK

"Ray Price" wrote in message
...
Hi All,

I am trying to store XML data in a workbook hidden from the users.

It's
basically meta-data. I was using the custom properties, but it seems

there
is a limit of 256 characters.

Can anyone else suggest a good place for meta data?

Thanks!