26 lines
654 B
C#
26 lines
654 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using Aspose.Cells;
|
|
|
|
namespace MyCode.Project.Infrastructure.Common
|
|
{
|
|
public class ExcelHelper
|
|
{
|
|
#region HtmlToExcel(尝试将html转为excel)
|
|
/// <summary>
|
|
/// 尝试将html转为excel
|
|
/// </summary>
|
|
/// <param name="htmlPath"></param>
|
|
/// <param name="xlsPath"></param>
|
|
public static void HtmlToExcel(string htmlPath,string xlsPath)
|
|
{
|
|
var workbook = new Workbook(htmlPath);
|
|
workbook.Save(xlsPath);
|
|
}
|
|
#endregion
|
|
}
|
|
}
|