rgRge.SetItem(_variant_t((long)8),_variant_t((long)4),_variant_t(m_goods_source));
rgRge.SetItem(_variant_t((long)8),_variant_t((long)6),_variant_t(m_store_type));
rgRge.SetItem(_variant_t((long)9),_variant_t((long)2),_variant_t(m_bill_number));
rgRge.SetItem(_variant_t((long)9),_variant_t((long)4),_variant_t(m_trans_man));
rgRge.SetItem(_variant_t((long)10),_variant_t((long)2),_variant_t(m_memo));
wssheet.Activate();
wbBook.SetSaved(true);
ExcelApp.SetVisible(true);
wbBook.PrintPreview(_variant_t(false)); //打印预览
rgRge.ReleaseDispatch();
wssheet.ReleaseDispatch();
wsssheets.ReleaseDispatch();
wbBook.Close(_variant_t(false),COleVariant("path"),_variant_t(false));
wbBook.ReleaseDispatch();
wbsBooks.ReleaseDispatch();
ExcelApp.ReleaseDispatch();
ExcelApp.Quit();
|