To import an excel file and save it as a compressed access database (cab file) in Python, we can use the following code:
main.py568 chars23 linesThis code uses the pandas library to import the Excel file as a dataframe. We then use the pyodbc library to connect to an Access database and save the dataframe as a table. Finally, we compress the Access database file into a cab file using a special SQL command (APPENDFILE).
gistlibby LogSnag