def copy(wb): w = XLWTWriter() process( XLRDReader(wb,'unknown.xls'), w ) return w.output[0][1]
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()
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()
def copy(wb): w = XLWTWriter() process(XLRDReader(wb, 'unknown.xls'), w) return w.output[0][1]