Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: [xsl] Open Source - Excel to XML Converter

From: Andrew Franz <afranz0@---------------->
To:
Date: 10/4/2006 9:38:00 PM
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?


transparent
Print
Mail
Digg
delicious
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent