Pages

Banner 468 x 60px

 

Wednesday, February 5, 2014

Jobs for Upload a Table

0 comments
// CREATE BY TYO

static void New_EY_importCSP_ItemList(Args _args)
{
    SysExcelApplication application;
    SysExcelWorkbooks   workbooks;
    SysExcelWorkbook    workbook;
    SysExcelWorksheets  worksheets;
    SysExcelWorksheet   worksheet;
    SysExcelCells       cells;
    SysExcelCell        cell;
    COMVariantType      type;
    int                 row;   
   
    CSP_ItemList        CSP_ItemList;
    Itemid              itemid;
   
    Filename            fileName = "D:\\Tectura\\bisa.xlsx";  
   
    application = SysExcelApplication::construct();
    workbooks   = application.workbooks();

    try
    {
        workbooks.open(fileName);
    }
    catch (Exception::Error)
    {
        throw error(strfmt('File: "%1" cannot be opened.', fileName));
    }

    workbook   = workbooks.item(1);
    worksheets = workbook.worksheets();
    worksheet  = worksheets.itemFromNum(1);
    cells      = worksheet.cells();

    row  = 2;
    type = cells.item(row, 1).value().variantType();
   
    while (type != COMVariantType::VT_EMPTY)       
    {
        CSP_ItemList.clear();     
       
        ItemId                    = cells.item(row, 1).value().bStr();                     // Itemid
        CSP_ItemList.ItemId       = ItemId;                                                  // itemid                                 
       
        info("Selesai");            
          
        if (itemid!="")
        CSP_ItemList.insert();

        row++;
        type = cells.item(row, 1).value().variantType();
    } 
 

    application.quit();
  
}

// CREATE BY TYO

0 comments:

A financial dimension value is based on the record and has been used on a transaction. You cannot delete the record

  SOLUTION delete in table DimensionAttributeLevelValue base on Bank Account  :  and Delete the Bank Account FINISH