Skip to main content

Notifications

Announcements

No record found.

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!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans