Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/typescript/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Excel 如何清除Office脚本中的表格样式?_Excel_Typescript_Office Scripts - Fatal编程技术网

Excel 如何清除Office脚本中的表格样式?

Excel 如何清除Office脚本中的表格样式?,excel,typescript,office-scripts,Excel,Typescript,Office Scripts,如何清除桌子上的样式?我尝试录制宏,但录制并运行宏时,它会显示failed(Table setPredefinedTableStyle:参数无效或缺少,或格式不正确) 如何清除表格样式 web中的Excel表格总是有一种样式。没有办法清除所有样式。 似乎没有办法指定“无”样式,这是最基本的样式。我会跟进的 我最接近的方法是使用TableStyleLight1样式,如下所示 函数主(工作簿:ExcelScript.workbook){ 让selectedSheet=workbook.getAc

如何清除桌子上的样式?我尝试录制宏,但录制并运行宏时,它会显示failed(Table setPredefinedTableStyle:参数无效或缺少,或格式不正确)

如何清除表格样式


web中的Excel表格总是有一种样式。没有办法清除所有样式。 似乎没有办法指定“无”样式,这是最基本的样式。我会跟进的

我最接近的方法是使用
TableStyleLight1
样式,如下所示

函数主(工作簿:ExcelScript.workbook){
让selectedSheet=workbook.getActiveWorksheet();
让mainTable=selectedSheet.getTable(“mainTable”);
mainTable.setPredefinedTableStyle('TableStyleLight1')
}
function main(workbook: ExcelScript.Workbook) {
  let selectedSheet = workbook.getActiveWorksheet();
  let mainTable = selectedSheet.getTable("MainTable");
  mainTable.setPredefinedTableStyle("undefined");
}