Created
October 18, 2014 08:32
-
-
Save nyanshell/9e29bb50d34ac532b788 to your computer and use it in GitHub Desktop.
Convert xlsx to csv in a directory
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/python3 | |
# -*- coding: utf-8 -*- | |
""" | |
xlsx2csv may have some issues while converting datetime | |
""" | |
import xlsx2csv | |
from glob import glob | |
def convert(prefix): | |
for _ in glob("%s*.xlsx" % prefix): | |
converter = xlsx2csv.Xlsx2csv(_) | |
converter.convert(_.rsplit(".", 1)[0]+".csv") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment