Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在“IIS7”下的“mvc3 Razor”应用程序上工作,我希望生成一个 excel 文件(.xls 或 .xlsx),它从具有特定颜色和格式且性能良好的数据库中获取数据。我怎样才能做到这一点?
看看这个先前的问题。您可能可以根据需要对其进行调整。那个从 DataSet 生成一个 Excel 文件。也许您可以用您的数据库填充该 DataSet,然后调用该方法。
享受,
您可以使用允许您创建和操作 Excel 文件的库之一,例如EPPlus(开源)或Aspose(商业)。我对后者有积极的体验。