Can anyone give me an script that will convert a csv file to xls or
tell me what is needed?
--To view this discussion on the web, visit https://groups.google.com/d/msg/python-excel/-/zYThSOA98Y8J.
You received this message because you are subscribed to the Google Groups "python-excel" group.
To post to this group, send an email to python...@googlegroups.com.
To unsubscribe from this group, send email to python-excel...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/python-excel?hl=en-GB.
You could always do it the good old fashion way. Split on the commas and '\n' and write to a .xls using the excel functionality from the win32.com module.
That may be the old-fashioned way (prior to Python 2.3) but it is far
from being a good way. If you care at all about reading the data
correctly, you really should just use the csv module.
As for COM, it's slower and requires the script to be running on a PC
with Excel installed. (Not to mention pywin32 installed.) Unless you
really need something from Excel that cannot be written with xlwt,
just use xlwt.
And, as John Machin suggests, if you are going to use COM, you might
as well use it for input as well. (Though personally, at that point I
tend to just go with VBScript instead of Python.)
John Y.