have any material about navision generate excel file?

gisongison 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

  • NaviDevNaviDev 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....
  • shettarvikasshettarvikas 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
  • gisongison 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
  • bbrownbbrown 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.
  • NaviDevNaviDev 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....
  • bbrownbbrown 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.
  • gisongison 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?
    :?
  • idiotidiot 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
  • gisongison 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. :?
  • gisongison 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
  • SaalekSaalek 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
  • gisongison 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...
  • ufukufuk Member Posts: 514
    Double Underline:

    xlRange.Font.Underline := 3;
    Ufuk Asci
    Pargesoft
  • gisongison 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.
  • gisongison 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.... :?
  • BeliasBelias 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
  • ufukufuk 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
  • BeliasBelias Member Posts: 2,998
    ok...I remembered well :mrgreen:
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
  • gisongison Member Posts: 128
    I appreciated you all.
    :o
Sign In or Register to comment.