All the books, papers, letters, and transactions pertaining to the office of treasurer shall be open for the inspection of a committee of the legislature to examine or settle all accounts, and to count all money; and to the inspection of the public generally during office hours; and when the successor of any treasurer is elected and qualified, the state auditor shall examine and settle all the accounts of the treasurer remaining unsettled, and give him or her a certified statement showing the balance of moneys, securities, and effects for which he or she is accountable, which have been delivered to his or her successor, and report the same to the legislature.