|
-
July 18th, 2000, 03:11 PM
#1
Converting CSV to XML File Format
Hello All,
I have a question about converting a CSV file to XML format how do I do this,
Thanks for any suggestions.
-
July 18th, 2000, 04:18 PM
#2
Re: Converting CSV to XML File Format
There is a MSXml component in VB6.
-
July 19th, 2000, 01:49 AM
#3
Re: Converting CSV to XML File Format
-
July 19th, 2000, 03:35 AM
#4
Re: Converting CSV to XML File Format
if you are familiar with the sed utility (a UNIX tool that's also available for Win32 from www.gnu.org), you can write a converter in a few lines:
1i\
<?xml version="1.0"?>
1i\
<rows>
i\
<row>
s/\(.*\)/\1;/
s@\([^;]+\);@<column>\1</column>@gp
i\
</row>
$a\
</rows>
call this from a DOS commandline (or from vB via shell) like this:
sed -nf yourscriptfile yourinputfile>outputfile.xml
it creates a <row> tag for each row in the CSV file and a <col> tag for each column and all the required tags, so that you can view the result in IE 5.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|