excel.application thisapp = new excel.applicationclass();
excel.workbooks thiswbs = thisapp.workbooks;
excel.workbook thiswb = thiswbs.open("g:/demo.xls",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);
thiswb.saveas("g:/helloexcel.xml",excel.xlfileformat.xlxmlspreadsheet,missing.value,missing.value,missing.value,missing.value,excel.xlsaveasaccessmode.xlnochange,missing.value,missing.value,missing.value,missing.value,missing.value);
//excel.xlfileformat.xlxmlspreadsheet控制存储文件的类型
system.runtime.interopservices.marshal.releasecomobject(thiswb);
thiswb = null;
thiswbs.close();
system.runtime.interopservices.marshal.releasecomobject(thiswbs);
thiswbs = null;
system.runtime.interopservices.marshal.releasecomobject(thisapp);
thisapp = null;
gc.collect();