Skip Links

Network World

  • Social Web 
  • Email 
  • Close

Turning spreadsheets into XML

Dr. Internet By Steve Blass , Network World , 01/26/2004
Steve Blass

What's the easiest way to convert data stored in comma-separated value files into XML format? We need to use the names in the header row of the CSV file for the XML element names and create a basic XML document containing <rows> filled with the named elements containing our data values.

You can find CSV-to-XML conversion programs with a simple Web search.

The easiest solution is to let somebody else do it. A free online conversion utility found in the Tools section at www.creativyst.com will transform files up to 250K bytes using a simple Web form.

Paste your CSV data into the form, and copy the XML results back using your browser. Kirk Evans describes how to convert CSV to XML using XSLT and the XPATH functions substring-before() and substring-after() to parse the rows and values on the weblogs.asp.net site (details here). You have to wrap the CSV data in an XML <root> tag to process the file with XSLT.

For converting large numbers of large CSV files, you will want a stand-alone desktop program, such as the CSV 2 XML Converter from www.goedeke.net, which lets you output multiple XML formats from existing CSV files.

Partner Content
CA logo

CA Network & Voice Resource Center

Comprehensive Network & Voice Management Visit CA Network & Voice Management Resource Center and get insights into industry best practices, information that helps you to address your challenges.

CA Network & Voice Management Resource Center

whitepaper

Managing Voice Over IP for Successful Convergence

Voice over IP (VoIP) has much to offer in cost savings but some customers have concerns about VoIP call quality compared to the quality of traditional voice services. This white paper will help you learn how to take the right steps so that voice quality is assured.

Managing VoIP for Successful Convergence

whitepaper

The Changing Face of Network Management

Managing your network is serious business. This paper discusses the benefits of integrating configuration change-awareness into your network fault management solution

Download Whitepaper

Comment
Login
Forgot your account info?
Add comment
Anonymous comments subject to moderator approval. Register here for member benefits.
Have a NetworkWorld account? Log in here. Register now for a free account.

Videos

rssRss Feed
Save The Date!
What They Are Saying

Rick Cook has written thousands of articles, and that means what--- he knows "Microsoft Word"? Phaseit?...- Anonymous

Join the Discussion