LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 129
Default Read/Write variables to XML file using VBA

You can save your workbook in XML format but you don't get much control
of how the XML looks.

This will get you started, it writes :
<xml
<datasomedata</data
</xml

to a file named my.xml


Open "C:\my.xml" For Output As #1
Print #1, "<xml"+ Chr(10)
Print #1, "<datasomedata</data+ Chr(10)
Print #1, "</xml" + Chr(10)
Close #1

I haven't done reading in a while, but last I checked you had to add
MSXML 4.0 and that added an XML library to your references that
provides all the normal DOM subs and functions.

Excel will read XML natively, you can access the worksheet and cells it
creates. Try that first.

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
I have a read only xl file, I need it to be read and write drama queen Excel Discussion (Misc queries) 3 July 1st 06 12:25 AM
read only file-need to write judithbear Excel Discussion (Misc queries) 4 January 17th 06 03:31 PM
How can a file be converted from Read-Only to Read/Write Jim in Apopka Excel Discussion (Misc queries) 2 November 19th 05 04:59 PM
Read and Write Excel file Robot Excel Programming 0 June 3rd 05 02:56 PM
Read variables from external file Daniel Köster Excel Programming 2 October 2nd 03 07:55 AM


All times are GMT +1. The time now is 06:22 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"