MIDRANGE dot COM Mailing List Archive



Home » MIDRANGE-L » December 2012

RE: CSV to XLS(x)



fixed

Very interesting.
Do you if there is support for the reverse XLS(x) to CSV?

Peter

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Winchester Terry
Sent: Wednesday, 5 December 2012 9:16 a.m.
To: 'Midrange Systems Technical Discussion'
Subject: Re: CSV to XLS(x)


Just an FYI for anyone who attempts to use John's code example...

The latest version for the xlwt package named xlwt-0.7.4.tar.gz contains a python script named "BIFFRecords.py". Within this script there are strange quotation characters at line 1728 and greater that must be converted to a normal double-quote before placing this in the IFS otherwise you will receive the following error:


Traceback (most recent call last):
File "/python27/scripts/cpytoxlsf.py", line 62, in <module>
import xlwt
File "/python27/site-packages/xlwt/__init__.py", line 10, in <module>
from Workbook import Workbook
File "/python27/site-packages/xlwt/Workbook.py", line 43, in <module>
import BIFFRecords
File "/python27/site-packages/xlwt/BIFFRecords.py", line 1728
SyntaxError: 'charmap' codec can't decode byte 0x9d in position 0: character maps to <undefined>


Although this whole process was kind of a PITA to install and get working correctly, it appears that this language might come in very handy...if I can find the time to learn it. Kudos to John for posting a usable script for us newbies :)

Terry


In my opinion, even easier than Scott's POI-based stuff is iSeries
Python and xlwt:

http://www.iseriespython.com
http://pypi.python.org/pypi/xlwt

Using those, I've written a utility which automatically converts
physical files to Excel files:

http://code.midrange.com/13ccf4d70e.html

John

Confidentiality Notice:

The preceding e-mail message (including any attachments) contains information that may be confidential, protected by applicable legal privileges, or constitute non-public information. It is intended to be conveyed only to the designated recipient(s). If you are not an intended recipient of this message, please notify the sender by replying to this message and then delete it from your system. Use, dissemination, distribution or reproduction of this message by unintended recipients is not authorized and may be unlawful.








Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2014 by MIDRANGE dot COM and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available here. If you have questions about this, please contact