将excel转化成html页面

来源:互联网 发布:淘宝司法拍卖房子的税 编辑:程序博客网 时间:2024/09/21 09:06
      /// <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);

        }


要引用 Aspose.Cells.dll

0 0