AX 2012 Excel sheet copy 和BorderLine

 //**********************************************

//sheet copy

abstract class SysExcelWorksheet extends SysExcel
{
    MSOfficeVersion   version;
}

public SysExcelWorksheet copy()
{
    COM newSheet = worksheet.copy(COMArgument::NoValue, this.comObject()); //add

    return SysExcelWorksheet::construct(version, newSheet);
}

 

//**********************************************

//BorderLine

abstract class SysExcelRange extends SysExcel
{
    MSOfficeVersion   version;
}

public void BorderLine()//Add
{
    Com        borders;
    ComVariant  LineStyle,Weight,ColorIndex;
    int        xlEdgeBottom = 9;
    int        xlContinuous = 1;
    int        xlThin =       1;
    int        xlAutomatic  = -4105;

   borders    = range.Borders() ;
   LineStyle  = borders.LineStyle(xlContinuous);
   Weight     = borders.Weight(xlThin);
   ColorIndex = borders.ColorIndex(xlAutomatic);
}

posted @ 2017-02-27 09:26  Fog-Fog  阅读(181)  评论(0编辑  收藏  举报