export excel

medTUNmedTUN Member Posts: 9
edited 2004-03-15 in Navision Attain
I Want to export item No. to excel report,
"item No." is code eg. item No.= 0014525
after export i have in excel report 14525
how method to obtein 0014525
karray mohamed
teleph. : +216 71 88 71 95
mobile : +216 98 66 08 33

Comments

  • wonmowonmo Member Posts: 139
    How are you exporting it into excel. If you are just copying and pasting then set the column that this field will go into as a text field. If you are importing into excel via a text file then make sure that you set that field property as text.
  • medTUNmedTUN Member Posts: 9
    Hi,
    no i develop unit code,
    contain some information between item and post order's
    but i obtain in excel item No =14525
    in unit code
    xlWorkSheet.Range('E' + FORMAT(RowNoCount)).Value :=Format(Ite."No.");
    xlWorkSheet.Range('D' + FORMAT(RowNoCount)).Value :=FORMAT(Postord."posting Date");
    i obtain in column "D" 02/01/2003 but in column "E" 14525
    but i would obtain in column "D" 02/01/2003 but in column "E" 0014525
    karray mohamed
    teleph. : +216 71 88 71 95
    mobile : +216 98 66 08 33
  • kailoukailou Member Posts: 14
    if you are writting directly to excel worksheet append a single quotation:
    eq ''''+format(000123444)
  • kailoukailou Member Posts: 14
    so you need to change Format(Ite."No.") to ''''+Format(Ite."No.")

    hope that helps



    mahannokoy@yahoo.com
  • wonmowonmo Member Posts: 139
    You don't need the FORMAT statement for Item."No.". First of all, it is a code field and secondly, if you use the value property you don't have to convert to text.

    Another way is this:

    xlWorkSheet.Range('E' + FORMAT(RowNoCount)).Text :=Item."No.";
  • medTUNmedTUN Member Posts: 9
    hi,
    no all this method are don't work, is it another method to convert the rows E to text i.e before export i would change the format cellule fronm standard to text?
    karray mohamed
    teleph. : +216 71 88 71 95
    mobile : +216 98 66 08 33
  • janpieterjanpieter Member Posts: 298
    If you want a number to be 00124 instead of 124, the same thing happens when you insert a number manualy into excel.

    I think you can try 2 things:
    1. In your excel template document select column 'E' and go to cell properties. Change the category in 'text'.
    2. - Make a tekst constant QOUTE containing the text ' (single quote)
    - xlWorkSheet.Range('E' + FORMAT(RowNoCount)).Value :=Format(QOUTE + Ite."No.");

    Don't know for sure if it works, good luck!
    In a world without Borders or Fences, who needs Windows and Gates?
  • giulio.cipogiulio.cipo Member Posts: 77
    if you want cells like text the solution is the follow code
    XlWorkSheet.Range(xlColID + xlRowID).NumberFormat := '@';
    you could use the standard function table excel buffer
Sign In or Register to comment.