Closed Excel Automation

TimSmithTimSmith Member Posts: 36
Hi,
I am writing a report extract to excel which has multiple worksheets and will use the previous entries to arrive at certain totals.

The report is based on commission values and each sheet represents a salesperson.

I have two issues that I am trying to resolve.

1. How do i open and close specific worksheets, i.e. as i move from salesperson 1 to salesperson 2 I need to close the 1st worksheet and open the 2nd. 8-[

2. I want to use cells within the worksheet to perform calculations within my Nav code. How do I reference them? :-s

Thanks [-o<
Tim

Comments

  • BurneBurne Member Posts: 12
    I'm going out on a limb here, but I think given the extent of the automation involved, you might want to consider writing your excel access logic in a separate layer like a VB/VC++ Active X control.

    http://msdn.microsoft.com/library/defau ... bjects.asp

    Googling for 'excel automation' would get you plenty of source code in multiple languages to be on your way.

    HTH,

    Paul.
  • girish.joshigirish.joshi Member Posts: 407
    I don't agree with Burne at all. This is pretty standard stuff to do within Navision.

    If you have the 4.0 application designers guide, there is some sample code in there that does a lot of it.
  • Marije_BrummelMarije_Brummel Member, Moderators Design Patterns Posts: 4,262
    You can have a look at the table 370 Excel Buffer. This contains an excel automation example.

    More advanced stuff about excel automation you can find on the download part of this site or via the search engine.

    Good luck.
Sign In or Register to comment.