日期:2014-05-17 浏览次数:20659 次
原文: using Excel; ?public void ReadExcel(string rFilePath,string rHtmlFilePath) ???object?? ofmt?? =?? Excel.XlFileFormat.xlHtml;??? ??}
using System.Reflection;?
??{
???Excel.Application?? repExcel?? =?? new Excel.Application();???
???Excel.Workbook?? workbook?? =?? null;???
????
???//xlsFile为Excel文件路径???
???workbook?? =?? repExcel.Application.Workbooks.Open(rFilePath,
????Missing.Value,
????Missing.Value,
????Missing.Value,
????Missing.Value,
????Missing.Value,
????Missing.Value,
????Missing.Value,
????Missing.Value,
????Missing.Value,
????Missing.Value,
????Missing.Value,
????Missing.Value,
????Missing.Value,
????Missing.Value);?????
????
???//htmlFile?? 是要另存的html文件名??
???workbook.SaveAs(rHtmlFilePath,???
????ofmt,???
????Missing.Value,???
????Missing.Value,???
????Missing.Value,???
????Missing.Value,
????Excel.XlSaveAsAccessMode.xlNoChange,???
????Missing.Value,???
????Missing.Value,
????Missing.Value,
????Missing.Value,
????Missing.Value);???
????
???object?? osave?? =?? false;???
???workbook.Close(osave,Missing.Value,Missing.Value);??