Convert code to text during export to excel

I have a report which exports information of items such as crossreference no to excel. On report preview I have the information ok , such as Crossreference no 020000100 but on excel it gives 20000100 because it transfers them to number
Can someone help me how to export to excel this to text?
I have tried a lot of commands but it nothing seems to working.



Best Answer

  • KishormKishorm Member Posts: 921
    Answer ✓
    you need 4 single quotes so something like this...
    Bcode := '''' + CrossReference;
    

Answers

  • da_nealda_neal Member Posts: 76
    edited 2017-03-05
    Try to add ' before exported value. And one method to establish excel cell format to text.
  • T222T222 Member Posts: 63
    Yes i have tried to do this and add this to crossreference number but it doesn't accept my command
    I have tried to put this in single code such as
    Bcode := ' ' '

    but doesn't accept it because program use single codes by itself. Is there any other way?
  • KishormKishorm Member Posts: 921
    Answer ✓
    you need 4 single quotes so something like this...
    Bcode := '''' + CrossReference;
    
  • T222T222 Member Posts: 63
    Thank you!!!!!!
Sign In or Register to comment.