Fix a potential SQLITE_MISUSE in the .excel command when no database is open.