Options

Images

smishrasmishra Member Posts: 28
is anyone use the images in excel in NAV 2013 R2?

Answers

  • Options
    i think i have done Some Export to excel Reports on NAV 2015
  • Options
    smishrasmishra Member Posts: 28
    Please give me some solution how can do this.
  • Options
    rajavenkat74@gmail.comrajavenkat74@gmail.com Member Posts: 19
    edited 2016-06-30
    Sorry I have making my code for You. i Mean recollecting... B) .Thnx for Asking...... :)
    Lets see the Variable i did these using Dotnet Variables As per Some MVP's Suggestions in NAV 2016
    Name DataType Subtype Length
    Xlapp DotNet Microsoft.Office.Interop.Excel.ApplicationClass.'Microsoft.Office.Interop.Excel, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c'

    Xlwrkbk DotNet Microsoft.Office.Interop.Excel.Workbook.'Microsoft.Office.Interop.Excel, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c'

    Xlwrksht DotNet Microsoft.Office.Interop.Excel.Worksheet.'Microsoft.Office.Interop.Excel, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c'

    XlRange DotNet Microsoft.Office.Interop.Excel.Range.'Microsoft.Office.Interop.Excel, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c'


    Companyinfo Record Company Information

    FilePath Text

    Xlapp := Xlapp.ApplicationClass;
    Xlwrkbk := Xlapp.Workbooks.Add('');
    Xlwrksht := Xlwrkbk.Worksheets.Item(1);
    Xlapp.Visible(TRUE);
    Companyinfo.GET('');
    Companyinfo.CALCFIELDS(Picture);
    IF Companyinfo.Picture.HASVALUE THEN BEGIN
      FilePath := 'C:\myimage.bmp';
      Companyinfo.Picture.EXPORT(FilePath);
    END;
    XlWrkSht.Shapes.AddPicture(FilePath, 1, 1, 0, 0, 300, 250);
    

    Let Me Know If it Helped Or you got Some Problem
  • Options
    rajavenkat74@gmail.comrajavenkat74@gmail.com Member Posts: 19
    edited 2016-06-30
    Sorry I havent explained about Function Addpicture
    it takes Parameters
    string Filename,
    MsoTriState LinkToFile,
    MsoTriState SaveWithDocument,
    float Left,
    float Top,
    float Width,
    float Height
Sign In or Register to comment.