Esempio n. 1
0
def copy(wb):
    w = XLWTWriter()
    process(
        XLRDReader(wb,'unknown.xls'),
        w
        )
    return w.output[0][1]
Esempio n. 2
0
def save(wb, filename_or_stream):
    if isinstance(filename_or_stream, basestring):
        filename = os.path.split(filename_or_stream)[1]
        stream = open(filename_or_stream, 'wb')
        close = True
    else:
        filename = 'unknown.xls'
        stream = filename_or_stream
        close = False
    process(XLRDReader(wb, filename), StreamWriter(stream))
    if close:
        stream.close()
Esempio n. 3
0
def save(wb,filename_or_stream):
    if isinstance(filename_or_stream,basestring):
        filename = os.path.split(filename_or_stream)[1]
        stream = open(filename_or_stream,'wb')
        close = True
    else:
        filename = 'unknown.xls'
        stream = filename_or_stream
        close = False
    process(
        XLRDReader(wb,filename),
        StreamWriter(stream)
        )
    if close:
        stream.close()
Esempio n. 4
0
def copy(wb):
    w = XLWTWriter()
    process(XLRDReader(wb, 'unknown.xls'), w)
    return w.output[0][1]