Показать сообщение отдельно
Старый 02.05.2007, 14:15   #13  
vasiliy is offline
vasiliy
Программер
 
288 / 17 (1) ++
Регистрация: 21.10.2004
Адрес: E-burg
X++:
    RNumDateInWordConverter converter = new RNumDateInWordConverter("ru"); //direct setup "ru" for external templates
    com comapp, comapp2;
    COMVariant cv;
    ;
    if (this.makeDocument())
    {
         .......
        rowCount = 0;
        while select assetInventoryTrans
            where assetInventoryTrans.InventoryTableRecId == assetInventoryTable.RecId &&
                  assetInventoryTrans.assetStandardId     == assetStandardId
        {
            assetTable = RAssetTable::find(assetInventoryTrans.AccountNum);
            rowCount++;
            excellDocument.insertRow(j);
            excellDocument.insertValue(ComExcelDocument_RU::numToNameCell(1, j), rowCount);
            ........
            j++;
            comapp = excellDocument.getComDocument();//.Application();
            comapp2 = comapp.application();
            cv = comapp2.ExecuteExcel4Macro('GET.DOCUMENT(50)');
            info( strfmt("%1", cv.char() ));
        }
        excellDocument.deleteRow(40);
        excellDocument.deleteRow(40 + rowCount);
        excellDocument.insertValue(ComExcelDocument_RU::numToNameCell(4, 43 + rowCount), converter.numeralsToTxt(rowCount));
        excellDocument.insertValue(ComExcelDocument_RU::numToNameCell(9, 62 + rowCount), rowCount);
        excellDocument.visible(true);
    }
}
Часть кода упустил. Это стандартный отчет Инвентаризация ОС, полный код можно посмотреть в классе \Classes\RAssetInventoryToExcell.