How to unit test Excel VBA code

前端 未结 3 1494
自闭症患者
自闭症患者 2021-01-30 13:30

Does anyone have any experience with unit testing Excel VBA code? I want to introduce unit tests into some legacy Excel VBA code as painlessly as possible. One idea I had would

3条回答
  •  北荒
    北荒 (楼主)
    2021-01-30 14:01

    The xlwings guys just demoed how to unit tests VBA functions in Python. Essentially, you do not need to add anything to your workbook but you rater write "stand alone" Python code that call your VBA functions so that you can compare expected vs actual results of your VBA functions.

提交回复
热议问题