kifield/kifield.py
def wb_to_csvfile(wb, csv_filename, dialect):
    """Save an openpyxl workbook as a CSV file."""

    logger.log(
        DEBUG_DETAILED,
        "Converting an XLSX workbook and saving as CSV file {}.".format(csv_filename),
    )
    ws = wb.active
    mode = "w"
    if USING_PYTHON2:
        mode += "b"
    with open(csv_filename, mode) as csv_file:
        writer = csv.writer(csv_file, dialect=dialect, lineterminator="\n")
        for row in ws.rows:
            writer.writerow([cell.value for cell in row])
Save an openpyxl workbook as a CSV file.
Save an openpyxl workbook as a CSV file.
Save an openpyxl workbook as a CSV file .
def wb_to_csvfile(wb, csv_filename, dialect):
    logger.log(
        DEBUG_DETAILED,
        "Converting an XLSX workbook and saving as CSV file {}.".format(csv_filename),
    )
    ws = wb.active
    mode = "w"
    if USING_PYTHON2:
        mode += "b"
    with open(csv_filename, mode) as csv_file:
        writer = csv.writer(csv_file, dialect=dialect, lineterminator="\n")
        for row in ws.rows:
            writer.writerow([cell.value for cell in row])
def wb_to_csvfile ( wb , csv_filename , dialect ) : logger . log ( DEBUG_DETAILED , "Converting an XLSX workbook and saving as CSV file {}." . format ( csv_filename ) , ) ws = wb . active mode = "w" if USING_PYTHON2 : mode += "b" with open ( csv_filename , mode ) as csv_file : writer = csv . writer ( csv_file , dialect = dialect , lineterminator = "\n" ) for row in ws . rows : writer . writerow ( [ cell . value for cell in row ] )
Save an openpyxl workbook as a CSV file.
Save an openpyxl workbook as a CSV file .
"""Save an openpyxl workbook as a CSV file."""
wb
csv_filename
dialect