19. Februar 2007 17:00
QuantNotificHeader.INIT;
QuantNotificHeader."No." := '';
QuantNotificHeader.INSERT(TRUE);
//CREATE(xlApp);
//xlBook := xlApp.Workbooks.Add(-4167);
//xlSheet := xlApp.ActiveSheet;
xlSheet.Name('Tabelle1');
xlSheet.Activate;
QuantNotificHeader.VALIDATE("Customer No.",xlSheet.Range('A1').Value);
QuantNotificHeader.VALIDATE("Notification Year",xlSheet.Range('B2').Value);
xlSheet.Name('Tabelle2');
xlSheet.Activate;
QuantNotificLine.INIT;
QuantNotificLine."Notification No." := '';
QuantNotificLine.INSERT(TRUE);
QuantNotificLine.VALIDATE("Line No.", xlSheet.Range('C3:E3').Value);
QuantNotificLine.VALIDATE(Quantity,Quant);
19. Februar 2007 19:27
Name DataType Subtype Length
XlApp Automation Unknown Automation Server.Application
XlWrkBk Automation Unknown Automation Server.Workbook
XlWrkshts Automation Unknown Automation Server._Worksheet
IF NOT CREATE(XlApp,TRUE) THEN
ERROR('Excel wurde nicht gefunden.');
XlApp.Workbooks.Open('C:\Mappe1.xls');
XlWrkBk := XlApp.ActiveWorkbook;
XlWrkshts := XlWrkBk.Worksheets.Item('Tabelle1');
QuantNotificHeader.VALIDATE("Customer No.",XlWrkshts.Range('A1').Value);
QuantNotificHeader.VALIDATE("Notification Year",XlWrkshts.Range('B2').Value);
XlWrkshts := XlWrkBk.Worksheets.Item('Tabelle2');
QuantNotificLine.VALIDATE("Line No.",XlWrkshts.Range('C3:E3').Value);
QuantNotificLine.VALIDATE(Quantity,Quant);
XlApp.Workbooks.Close;
CLEAR(XlApp);
23. März 2007 11:38
23. März 2007 12:24
Name DataType Subtype Length
XlApp Automation 'Microsoft Excel 11.0 Object Library'.Application
XlWrkSht Automation 'Microsoft Excel 11.0 Object Library'.Worksheet
XlWrkshts Automation 'Microsoft Excel 11.0 Object Library'._Worksheet