我正在将 excel 工作表转换为 html 文件。在某些情况下,某些列中添加了语音,我不希望它们在转换后的 html 文件中。如何在转换时删除这些语音......?有什么办法可以以编程方式关闭语音..?这是我正在使用的代码
xApp = new Microsoft.Office.Interop.Excel.Application();
object missing = Type.Missing;
object trueObject = true;
xApp.Visible = false;
xApp.DisplayAlerts = false;
xWorkBook = xApp.Workbooks.Open(ExcelFilePath, missing, trueObject, missing, missing, missing,
missing, missing, missing, missing, missing, missing, missing, missing, missing);
object format = Microsoft.Office.Interop.Excel.XlFileFormat.xlHtml;
ConveredFilesPath = Path.Combine(outputDirTemp, ExcelFileName);
string tempFileName = ConveredFilesPath + ".html";
xWorkBook.SaveAs(tempFileName, format, missing, missing, missing, missing,
Microsoft.Office.Interop.Excel.XlSaveAsAccessMode.xlNoChange,
missing, missing, missing, missing, missing);
if(Directory.Exists(ConveredFilesPath+".files"))
ConveredFilesPath += ".files";
else
ConveredFilesPath += "_files";
for (int count = 1; count < xWorkBook.Sheets.Count + 1; count++)
{
processDetils.AddFileInfo((count).ToString(), ((Microsoft.Office.Interop.Excel.Worksheet)xWorkBook.Sheets.get_Item(count)).Name);
}
CloseExcelObject(ref xWorkBook, ref xApp);
有什么办法可以Turned off
在 Excel 对象中设置语音?这是演示excel文件的图片,粗体字符是拼音
在这里你可以清楚地看到一些单元格在顶部有语音但同样没有..