我试图通过mysql结果获取此数组。
var availableTags = [
"ActionScript",
"AppleScript",
"Asp",
"BASIC",
"C",
"C++",
"Clojure",
"COBOL",
"ColdFusion",
"Erlang",
"Fortran",
"Groovy",
"Haskell",
"Java",
"JavaScript",
"Lisp",
"Perl",
"PHP",
"Python",
"Ruby",
"Scala",
"Scheme"
];
是否如此简单:
var availableTags [] = <php echo $result['availabletags']; ?> ;
或者我应该做些什么?
答案 0 :(得分:1)
您可以通过运行以下查询来获得结果:
var excel = new Application();
var workbook = excel.Workbooks.Open(ExcelFileName, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing);
try
{
foreach (dynamic worksheet in workbook.Worksheets)
{
worksheet.Cells.ClearContents();
}
workbook.Save();
}
finally
{
workbook.Close();
excel.Quit();
}
如果您遇到任何问题,请告诉我。