ExcelBuffer.NewRow; ExcelBuffer.AddColumn("Inbound Warehouse Entry"."Serial No.",FALSE,'',FALSE,FALSE,FALSE,''); ExcelBuffer.AddColumn("Inbound Warehouse Entry"."Item Description",FALSE,'',FALSE,FALSE,FALSE,''); ExcelBuffer.AddColumn("Inbound Warehouse Entry"."Date Entered",FALSE,'',FALSE,FALSE,FALSE,''); ExcelBuffer.AddColumn(Dispatch."Posting Date",FALSE,'',FALSE,FALSE,FALSE,''); ExcelBuffer.AddColumn(Dispatch."Serial No.",FALSE,'',FALSE,FALSE,FALSE,''); ExcelBuffer.AddColumn("Ship-to Address".Name,FALSE,'',FALSE,FALSE,FALSE,''); ExcelBuffer.AddColumn("Sales Header"."Replacement Ship-to code",FALSE,'',FALSE,FALSE,FALSE,''); ExcelBuffer.AddColumn("Inbound Warehouse Entry"."Sales Returns Order No.",FALSE,'',FALSE,FALSE,FALSE,''); ExcelBuffer.AddColumn("Service Invoice Header"."Ship-to Name",FALSE,'',FALSE,FALSE,FALSE,''); ExcelBuffer.AddColumn("Service Invoice Header"."No.",FALSE,'',FALSE,FALSE,FALSE,''); ExcelBuffer.AddColumn(Desc,FALSE,'',FALSE,FALSE,FALSE,''); ExcelBuffer.AddColumn("Service Invoice Line"."Unit of Measure",FALSE,'',FALSE,FALSE,FALSE,''); ExcelBuffer.AddColumn("Service Invoice Line".Quantity,FALSE,'',FALSE,FALSE,FALSE,''); ExcelBuffer.AddColumn("Service Invoice Line"."Fault Code",FALSE,'',FALSE,FALSE,FALSE,''); ExcelBuffer.AddColumn("Fault Code".Description,FALSE,'',FALSE,FALSE,FALSE,''); ExcelBuffer.AddColumn("Service Invoice Line"."Fault Reason Code",FALSE,'',FALSE,FALSE,FALSE,''); ExcelBuffer.AddColumn("Fault Reason Code".Description,FALSE,'',FALSE,FALSE,FALSE,'');
Comments
Try the following..
Create a new Field in Excel Buffer table- Top Border (type - Boolean).
and write Code in Create sheet Function
if "Top Border" then
XlWrkSht.Range(xlColID + xlRowID).Borders.Item(3).LineStyle := XlContinuous;
Instead of AddColumn Function, Create a own Function and apply top border where you want.