if the output of the calibredb command has the information you want, then I would have thought it was much easier to load the csv file into the spreadsheet and manipulate it from there? A bit of VBA (rather than a recorded macro) could trivially re-arrange columns, apply formatting etc. That would avoid the need to construct complex ODBC queries (as well as the problem of getting the ODBC driver to work in the first place).
|