posted on 08:49 AM on Tuesday 21 July 2015
In my area of work, Excel files are the predominant form of data storage which is quite sad. And the amount of data kept in these files can be rather large. So I wrote a small python script to dump out the data in tab delimited form to STDOUT using openpyxl.
#!/usr/bin/env python
from openpyxl import load_workbook
import sys
import string
wb = load_workbook(sys.argv[1], read_only=True)
for ws in wb:
for row in ws.rows:
print string.join([ws.title] + map(lambda x: str(x.value), row), "\t")
Not bad for 4 lines of actual codes.
The evening view (07:15 PM on Thursday 23 July 2015)
Esther drew us (07:40 PM on Sunday 19 July 2015)
MySQL data loader (11:48 AM on Thursday 18 September 2014)
bonnie++ output (10:37 PM on Thursday 12 December 2013)
Bioinformatics resources (11:48 AM on Saturday 14 June 2008)
Script to extract FASTA sequences (01:04 PM on Monday 17 November 2014)