Spreadsheed Dynamic Database

How do I dynamically set the database in Spreadsheet. I tried changing the db_name in the config.php file but this does not work.