[研究]ASP.NET,Aspose.Cells 24.5.0 授權檔安裝與試用
2024-05-16
環境:Visual Studio 2022 + ASP.NET + WebForm + Web Application + C# + SQL Server 2019 + SQL Server Management Studio (SSMS) 19
********************************************************************************
如果沒有設定 Aspose License File 授權檔 (商業付費購買),產出的檔案會顯示 "Evaluation Only. Created with Aspose.Cells for .NET.Copyright 2003 - 2024 Aspose Pty Ltd.
********************************************************************************
Default.aspx.cs
using Aspose.Cells;
using System;
namespace WebApplication1
{
public partial class Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
// 如果沒有設定 Aspose License File,產出的檔案會
// 顯示 "Evaluation Only. Created with Aspose.Cells for .NET.Copyright 2003 - 2024 Aspose Pty Ltd.
//Aspose.Cells.License license = new Aspose.Cells.License();
//string licenseFilePath = Server.MapPath("~/App_Data/") + "Aspose.Total.Product.Family.lic";
//license.SetLicense(licenseFilePath); // 替換為你的授權檔案路徑
// 讀取 .ods 檔案
Workbook workbook = new Workbook(@"C:\temp\input.ods"); // 替換為你的 .ods 檔案路徑
// 將 .ods 檔案儲存為 .xlsx 檔案
workbook.Save(@"C:\Temp\output.xlsx", SaveFormat.Xlsx); // 替換為你想要儲存的 .xlsx 檔案路徑
}
}
}
|
(完)
相關
(完)


沒有留言:
張貼留言