Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV (Archived)

how to get space in export to excel in navision2015?

Posted on by Microsoft Employee

hi all,

i have a small issue in my report Export to excel code is there it's work fine.

here comment is text variable and i want to export this comment to excel and i write the code is


IF ExportToExcel THEN BEGIN
    i+=1;
    EnterCell(i,6,Comment,FALSE,FALSE,'');
END;

This is also works fine but i want to display Two spaces in front of Comment in Excel.

how can i done this one i tried as 

CommentG:='  '+Comment;

IF ExportToExcel THEN BEGIN
    i+=1;
    EnterCell(i,6,CommentG,FALSE,FALSE,'');
END;

but it's not working can any suggest me please........

Regards,

Ramesh.

*This post is locked for comments

  • keoma Profile Picture
    keoma 32,675 on at
    RE: how to get space in export to excel in navision2015?

    nice solution. did you try my solution ?

  • Verified answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: how to get space in export to excel in navision2015?

    Hi archer,

    I got my solutions as

    CLEAR(CommentG);

    ChrL:=32;

    CommentG:=Comment;

    FormatL:='_($* " "_);_(@@_)';

    IF ExportToExcel THEN BEGIN

     i+=1;

     EnterCell(i,6,CommentG,FALSE,FALSE,FormatL);

    END;

  • Suggested answer
    keoma Profile Picture
    keoma 32,675 on at
    RE: how to get space in export to excel in navision2015?

    this is excel specific. to write text in excel it needs to start with = and an apostroph sign: '

    example: ='. sample text'

    to use in c/al write '' (double apostroph) to get one aoostroph in the text.

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,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans