void app_WorkbookBeforeXmlExport(Microsoft.Office.Interop.Excel.Workbook wb, Microsoft.Office.Interop.Excel.XmlMap map, string url, ref bool cancel) { string workbookName = ""; string mapName = map.Name; try { workbookName = wb.Name; } catch (Exception e) { string errorMsg = e.Message; workbookName = "error: " + errorMsg; } notifyWorkbookBeforeXmlExport(workbookName, mapName, url); }
void app_WorkbookBeforeXmlImport(Microsoft.Office.Interop.Excel.Workbook wb, Microsoft.Office.Interop.Excel.XmlMap map, string url, bool isRefresh, ref bool Cancel) { string workbookName = ""; string mapName = map.Name; string refresh = "false"; try { workbookName = wb.Name; if (isRefresh) { refresh = "true"; } } catch (Exception e) { string errorMsg = e.Message; workbookName = "error: " + errorMsg; } notifyWorkbookBeforeXmlImport(workbookName, mapName, refresh); }
public void WorkbookAfterXmlExport(Microsoft.Office.Interop.Excel._Workbook oWB, Microsoft.Office.Interop.Excel.XmlMap oMap, string sUrl, Microsoft.Office.Interop.Excel.XlXmlExportResult Result) { if (xlWorkbookAfterXmlExport != null) { if (!m_DisableEventsIfEmbedded || (m_DisableEventsIfEmbedded && !IsEmbedded(ref oWB))) { xlWorkbookAfterXmlExport(oWB, oMap, sUrl, Result); } } //Release any COM objects passed into the event ComRelease(oWB); ComRelease(oMap); }
public void WorkbookBeforeXmlImport(Microsoft.Office.Interop.Excel._Workbook oWB, Microsoft.Office.Interop.Excel.XmlMap oMap, string sUrl, bool IsRefresh, ref bool Cancel) { if (xlWorkbookBeforeXmlImport != null) { if (!m_DisableEventsIfEmbedded || (m_DisableEventsIfEmbedded && !IsEmbedded(ref oWB))) { xlWorkbookBeforeXmlImport(oWB, oMap, sUrl, IsRefresh, ref Cancel); } } //Release any COM objects passed into the event ComRelease(oWB); ComRelease(oMap); }