have any material about navision generate excel file?

gison
gison Member Posts: 128
Dear all,

I'm trying to generate excel file by Navision report,
but the only way to find the resource is some web site forum.
While the excel format is very complicated...does there have any material i can refer to? I'm sorry to trouble all you guys...buy it's really a big trouble for me. :?

kind regards,
gison

Comments

  • NaviDev
    NaviDev Member Posts: 365
    Use the search, just type in the word "Excel". You can see a lot of topics regarding with this one.

    Or you can also use the Excel Buffer table.
    Navision noob....
  • shettarvikas
    shettarvikas Member Posts: 106
    check report id 108 - customer - order detail. You will find the code and the same logic can be used for any report to excel.

    regards,
    vikas
  • gison
    gison Member Posts: 128
    Thanks you two....
    I'm trying to figure out which one I need to choice, excel buffer or excel automation ... :?

    kind regards,
    gison
  • bbrown
    bbrown Member Posts: 3,268
    It's not a choice. Excel automation uses the Excel Buffer table. Look at Budgets - Import/Export to Excel for an example
    There are no bugs - only undocumented features.
  • NaviDev
    NaviDev Member Posts: 365
    bbrown wrote:
    It's not a choice. Excel automation uses the Excel Buffer table. Look at Budgets - Import/Export to Excel for an example

    bbrown means other way.... Excel Buffer table uses the Excel automation.. :mrgreen:
    Navision noob....
  • bbrown
    bbrown Member Posts: 3,268
    NaviDev wrote:
    bbrown wrote:
    It's not a choice. Excel automation uses the Excel Buffer table. Look at Budgets - Import/Export to Excel for an example

    bbrown means other way.... Excel Buffer table uses the Excel automation.. :mrgreen:

    Something like that. :D
    There are no bugs - only undocumented features.
  • gison
    gison Member Posts: 128
    Dears,

    I tried excel automation before... but never tried these two together.
    The excel buffer look more simple to use....
    If I take the excel buffer one, is it possible to export base on a Excel template?
    :?
  • idiot
    idiot Member Posts: 651
    Typical usage will be something like this

    ExcelInterface.EnterCell (RowNo, ColNo, yourFieldorVariable, TRUE, FALSE, '@', ExcelBuffer);

    There are other ways also...
    NAV - Norton Anti Virus

    ERP Consultant (not just Navision) & Navision challenger
  • gison
    gison Member Posts: 128
    For what I known is we can use Excel buffer to generate file but Excel buffer work by automation, so finally, we better understand how to manipulate excel automation. :?
  • gison
    gison Member Posts: 128
    Dear all,
    Is it possible to export to excel with color.
    Because I just saw there are on have function in Excelbuffer to modify font style which included Blod and Italic.

    :o
  • Saalek
    Saalek Member Posts: 181
    Yes you can
    How ???

    Try this. Open Excel. Record a new Macro (In English is named Macro ??? :-k :-k ).
    Change color to a cell. Stop the macro and read the code generated in VB.
    Translate this code to C/AL and finished. \:D/ \:D/

    The code generated is:
    With Selection.Interior
            .ColorIndex = 6
            .Pattern = xlSolid
    End With
    

    Bye
  • gison
    gison Member Posts: 128
    Thank you all :)

    sorry, I got another problem....
    Is it possible to show double-underline?
    as you know... if we print a report, need to have a double-underline in the bottom of the report, usually we need to print a total amount with a double underline :?
    Have any one done this before....?

    deeply appreciated...
  • ufuk
    ufuk Member Posts: 514
    Double Underline:

    xlRange.Font.Underline := 3;
    Ufuk Asci
    Pargesoft
  • gison
    gison Member Posts: 128
    Thank you ufuk,

    I wanna ask a silly question..... why you all understand this kind of functions... from official documents...or :?

    thanks again.
  • gison
    gison Member Posts: 128
    is it also possible to show left-side border, right-side border, even the top-border.......sorry, i mean to show the whole cell border.... :?
  • Belias
    Belias Member Posts: 2,998
    if I remember well...
    in excel: you can start recording a macro, do what you want (e.g.: place borders, change color etc.), stop recording macro, edit the macro.
    you will see the code generated from you actions and then port it into nav...
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
  • ufuk
    ufuk Member Posts: 514
    Record macro and look VB code. Also look at the methods, properties and parameters of automation.

    I generally find by first looking at macro and then trying similiar things in C/AL.

    For border:
    xlSheet.Range('A1').BorderAround(1,2)

    You can test differences of border format by changing the BorderAround parameters.
    Ufuk Asci
    Pargesoft
  • Belias
    Belias Member Posts: 2,998
    ok...I remembered well :mrgreen:
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
  • gison
    gison Member Posts: 128
    I appreciated you all.
    :o