using Microsoft.Office.Interop.Excel; //引用 public void PrintPriviewExcelFile(string filePath) { Microsoft.Office.Interop.Excel.ApplicationClass xlApp = new Microsoft.Office.Interop.Excel.ApplicationClass(); xlApp.Visible = t
#遍历字典, 分别打印key, value, key:value emp = {'name':'Tom', 'age':20, 'salary' : 8800.00} for k in emp.keys(): print('key = {}'.format(k)) for v in emp.values(): print('values = {}'.format(v)) for v,k in emp.items(): print('{v}:{k}'.format(v = v, k = k)) 打