Storing XML In Workbook

  • Thread starter Thread starter Ray Price
  • Start date Start date
R

Ray Price

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!
 
Ray,
Excel 2002 and up can open/save XML files directly. You could hide it after
opening.

NickHK
 
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?
 
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
 
Hi ,

How is everything going? Please feel free to let me know if you need any
assistance.

Sincerely,

Wei Lu
Microsoft Online Community Support

==================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
Back
Top