Excel Buffer Error

redStriperedStripe Member Posts: 83
Hello,
i filled the table excel buffer with some data.
if i want to use the function createsheet i get an error
in this line:
XlWrkSht.Range(GetExcelReference(1) + ':' + xlColID + xlRowID).Columns.AutoFit;

...something about the ole object or the automation server.

can anyone help me?

thanks,
redStripe

Comments

  • ngebhardngebhard Member Posts: 127
    Hi!

    Maybe you have another version of Excel than Navision tries to use. Could you give me a more detailed error message?

    That would be helpful!
    Nicole
    ProTAKT Projekte & Business Software AG
    Microsoft Dynamics NAV Partner
    Bad Nauheim, Germany
    http://www.protakt.de
    http://twitter.com/protakt
  • ara3nara3n Member Posts: 9,257
    Hello
    There is also another product that works with all navision version and doesn't require any modification or coding. It works realy well with list reports. It is basically a printer driver that writes it to excel.

    http://helican.com/products/
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • SavatageSavatage Member Posts: 7,142
    ara3n wrote:
    Hello
    There is also another product that works with all navision version and doesn't require any modification or coding. It works realy well with list reports. It is basically a printer driver that writes it to excel.

    http://helican.com/products/

    kind of looks like www.print2excel.com

    does anyone have a comparison between these two?
    (sorry for going off topic) O:)
  • redStriperedStripe Member Posts: 83
    Hello,
    sorry for my late reaction but i wasn't in the office for while.
    ...but still having the same problem.
    Thanks for the tool-tips ... they are not bad - but they have some
    limitations and i can not use them my case.

    @nicole: here is the complete error message in german.
    http://web654.can16.de/html/error.JPG

    it would be very nice to here from you again.

    regards,
    redStripe
  • SaalekSaalek Member Posts: 181
    Hi

    I exported a lot of data using excel and I never had this message (My German isn't very good buy I'm learning it).

    I don't know why are you using
    .Columns.AutoFit
    

    When I create Excel structure, I use this code
    IF NOT ISCLEAR(xlapp) THEN
      CLEAR(xlapp);
    CREATE(xlapp);
    xlbook := xlapp.Workbooks.Add(-4167);
    xlapp.Caption:='Windows Title';
    Xlbooks :=xlapp.Workbooks;
    xlsheet := xlapp.ActiveSheet;
    xlRange := xlsheet.Range('A:AS');
    xlRange.ClearContents;
    

    After that, I write Navision table values in Excel

    Bye
  • ngebhardngebhard Member Posts: 127
    Hi RedStripe!

    After seeing the error message I can say that there is a problem with a range-function. If you send me the report I can have a look if you want to. Or you use the debugger to get the coding. If you tell me the detailed statement, maybe I can already help without the report!

    Greetz
    N.Gebhard
    ProTAKT Projekte & Business Software AG
    Microsoft Dynamics NAV Partner
    Bad Nauheim, Germany
    http://www.protakt.de
    http://twitter.com/protakt
  • Michael_SchumacherMichael_Schumacher Member Posts: 81
    @redstripe

    I think this error coms from a range which is out of range.
    eg. if you try to set negative address or the biggest column- or row-Value is above 65536 or something like that.
    regards,
    Michael Schumacher

    oh, what day is it? Backup day. OK, let's dump all data to /dev/nul ;-)
Sign In or Register to comment.