[Python-de] XLS format to XML konvertieren
Martin v. Löwis
martin at v.loewis.de
Fri Mar 7 09:22:48 EST 2003
"Josef Cihal" <josef.cihal at irm.at> writes:
> Gibt es bitte eine einfache Möglichkeit oder fertiges free source Programm,
> das ein XLS file (format) auf ein XML file(format) umwandelt.
> Ist die Problematik komliziert und umfangreich, oder ist es trivial?
Sicher gibt es einfache Möglichkeiten - Du musst genauer sagen, welche
Art von Umwandlung Du wünschst. Das einfachste Programm, dass eine
solche Umwandlung durchführt, ist:
f = open("foo.xls")
data = f.read()
print "<xls>foo.xls</xls>"
Wenn Du jetzt sagst, dass die Daten des xls-Files auch berücksichtigt
werden sollen: nichts leichter als das:
f = open("foo.xls")
data = f.read()
print "<xls>%s</xls>" % data.encode("base64")
Ciao,
Martin
More information about the Python-de
mailing list