Skip to main content

Notifications

Small and medium business | Business Central, N...
Suggested answer

How to merger 2 columns in excel buffer in business central

Posted on by 153
Hi guys,
How to merge two columns in using excel buffer.
Is any way to do this. or any sample example
 
Categories:
  • Suggested answer
    tanya07 Profile Picture
    tanya07 1,554 on at
    How to merger 2 columns in excel buffer in business central
    Hi,
     
    You can also calculate C1 value before like ..
    A1:=0;
    B1:=0;
    C1:=0;
    C1 := A1 + B1;
     
    and then use -
    ExcelBuf.AddColumn(A1, FALSE, '', FALSE, FALSE, FALSE, '#,##0.00', ExcelBuf."Cell Type"::Number);
    ExcelBuf.AddColumn(B1, FALSE, '', FALSE, FALSE, FALSE, '#,##0.00', ExcelBuf."Cell Type"::Number);
    ExcelBuf.AddColumn(C1, FALSE, '', FALSE, FALSE, FALSE, '#,##0.00', ExcelBuf."Cell Type"::Number);
     
    Regards,
    TK
  • liki Profile Picture
    liki 50 on at
    How to merger 2 columns in excel buffer in business central
    Hi,
    i would write extension where 
     
    // Retrieve the values from the two columns
    string column1Value = ExcelBuffer.GetValueByCellName("A1");
    string column2Value = ExcelBuffer.GetValueByCellName("B1");

    // Merge the values with a separator
    string mergedValue = column1Value + " " + column2Value;

    // Write the merged value to a specific cell
    ExcelBuffer.WriteCellValue("C1", mergedValue);
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

New! Quick response templatesâš¡

Save time with the new custom templates!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,134 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 229,928 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans