/// <summary>
/// 将excel转化成html页面
/// </summary>
/// <param name="filePath">excel路径</param>
/// <param name="savePath">生成的html保存路径</param>
public static void ExcelToHtml(string filePath,string savePath)
{
//Specify the HTML Saving Options
HtmlSaveOptions save = new HtmlSaveOptions(SaveFormat.Html);
//Instantiate a workbook and open the template XLSX file
Workbook book = new Workbook(filePath);
//Save the HTML file
book.Save(savePath, save);
/// 将excel转化成html页面
/// </summary>
/// <param name="filePath">excel路径</param>
/// <param name="savePath">生成的html保存路径</param>
public static void ExcelToHtml(string filePath,string savePath)
{
//Specify the HTML Saving Options
HtmlSaveOptions save = new HtmlSaveOptions(SaveFormat.Html);
//Instantiate a workbook and open the template XLSX file
Workbook book = new Workbook(filePath);
//Save the HTML file
book.Save(savePath, save);
}
要引用 Aspose.Cells.dll