Skip to content

Instantly share code, notes, and snippets.

Last active May 30, 2016 14:43
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
ALINCO Clone UtilityのCSVインポート機能は「"」が一番右の行についているとその列を無視してしまうので、すべてのセルから「"」を削除する。あと改行コードもWindowsに合わせる
import os.path
filename = input('CSV filename: ')
data = open(filename).readlines()
name, ext = os.path.splitext(filename)
out = open(name+'_ok'+ext, 'w')
outdata = ''
for row in data:
outrow = row.replace('\n','').replace('\r','').replace('\'','').replace('"','')
outdata += outrow+'\r\n'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment