Flexible Merge Excel Fields

HanneyHanney Member Posts: 41
Hi there, I want to merge excel, so I try find in here, found this post
viewtopic.php?f=23&t=16211
but i don't know how to add function inside excel buffer table...or is that just add new field name-Merge but what the data type?

but i don't want to hard code because i want to merge field based on how long the
description is?is that possible to make it?

Thanks..

Comments

  • prototyperprototyper Member Posts: 70
    If you want to make it flexible..

    Add 2 fields to the Excel Buffer table
    Merge (boolean)
    RangeID (Text 20)

    When inserting the line into the excel buffer set the Merge:=TRUE and populate the RangeID with text that meets the excel range syntax (eg 1A:1D) - (use string functions to create this string)

    In the CreateSheet section of the Excel Buffer add this
    IF Merge THEN BEGIN
    xlWkSht.Range(RangeID).Merge
    END;


    Hope this helps
    Sleep on it... The best solutions come at 2am
Sign In or Register to comment.