System.ArgumentException: An item with the same key has already been added. Key: medium

Please try again with this bugfix version:
https://www.gemboxsoftware.com/spreadsheet/nightlybuilds/GBS49v1291.zip

Or this NuGet package:
Install-Package GemBox.Spreadsheet -Version 49.0.1291-hotfix

Does this solve your issue?