[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Open Source - Excel to XML Converter

Subject: Re: Open Source - Excel to XML Converter
From: Andrew Franz <afranz0@xxxxxxxxxxxxxxxx>
Date: Thu, 05 Oct 2006 07:33:32 +1000
open source excel
Sorry, I missed the subject line.
We can fix that ;-)

Visual basic class to write to a text file, name this clXFile:
<code><![*CDATA*[
Private fno As Integer
Private eno As Long

Function xOpen(fs As String)
   fno = FreeFile(0)
   Open fs For Output As #fno
   eno = Err.Number
   xOpen = eno
End Function
Property Let xRec(val As String)
       Print #fno, val
End Property
Property Get ErrorNo() As Long
   ErrorNo = eno
End Property

Sub xClose()
   Close fno
   fno = 0
End Sub
]]></code>

Usage:
<code><![*CDATA*[
...
   Dim er As Long
   Dim ux As New clXFile
   er = ux.xOpenOut(fname)
   er = ux.xOpenOut(fname)
   If (er = 0) Then
       ux.xRec() = "<root>"
       ux.xRec() = "<row>...</row>"
      ....
       Call ux.xClose
   End If
]]></code>


Bryce K. Nielsen wrote:


Not very OpenSource, like the OP requested ;-)

There are actually many tools that can do this, and even XSLT 2.0 can read in a text document to transform into XML. I believe there are a bunch of tutorials online explaining how to do this, though don't know of any off hand that can. xmlLinguist (at http://www.sysonyx.com/products/xmllinguist) is a tool I work with that can translate a structured text document (i.e. a *.CSV) into XML if you don't want to go through XSL. It can be a cost effective solution at $80 for the designer, free for the runtime engine. Designed more for EDI documents, it can do CSVs easily enough.

Bryce K. Nielsen
SysOnyx, Inc. (www.sysonyx.com)
Makers of xmlDig, the XML-SQL Extractor
http://www.sysonyx.com/products/xmldig


Visual Basic

Rashmi Rubdi wrote:

It's a bit tedious to create this file manually and
was looking to enter the data in an Excel spread sheet
and then use a converter to convert from Excel to XML.

Does any one know a good converter?

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.