import sys
import time
import openpyxl
from beautifultable import BeautifulTable

def main():
    wb = openpyxl.load_workbook(sys.argv[1])

    sheet = wb.active

    ascii_table = BeautifulTable(max_width=640)
    for row in sheet.rows:
        ascii_table.append_row([cell.value for cell in row])

    print('/*')
    print('This Table is Generated by MAsciiTable Written by Snow Yang at %s'%(time.asctime( time.localtime())))
    print(ascii_table)
    print('*/')

if __name__ == "__main__":
    main()