Finding Last Record in Excel Sheet

I am an old VB Programmer working in the new World of Navision and was wondering about some of the Automation features involved with Navision. I recently attended a Programming/Development for End users class in Atlanta (which BTW was a VERY informative class, Taught by Liberty Grove Software…Small plug for ya mike). However we did not get a chance to get more involved in the automation server types. I have gone through some of the manuals and looked at what they had to offer. Course with any manual, it never covers EXACTLY what you are looking for. My question is : 1. With the Excel Automation server is there a way to set Current record (ROW No#) or even find Last Row? 2. Is there any part of this Forum that relates more to Automation.(Being new to this I have fallen in Love with Automation) 3. Although the Reports Designer inside of Navision is like none other, there are still some instances that I may need export directly into an MS Office Product (Access, Excel, ect.)? Now I know these are questions Ishould be asking my NSR. Unfortunatly these are questions they have no answers on. Don’t get me wrong They are wonderful people, but all they know is Navision and apparently Automation server is something new to them. Any help would GREATLY [img]/forum/images/icon_smile.gif" border=“0”> be appreciated. For Progress = 1 to 100 if Progress = 100 then Progress = 0 Else Next Progress Edited by - Vanbortel on 2002 Jul 12 00:04:46

Hi Scott, You can find the last used row in an Excel sheet using the UsedRange property of the Worksheet object. This returns a Range object representing the, well, used range of the sheet :wink: Be careful, however: UsedRange.Rows.Count of the returned Range holds the number of used rows, NOT the number of the last row! This makes a difference when the sheet contains a few empty lines at its top. You need to use the UsedRange.Rows.Row property too, which gives you the number of the first used row. We work quite a lot with the Automation interface. Whenever you need a varying or “unlimited” number of columns in your report, Excel comes in handy. “Advanced formatting”, like colors, grids etc. is also more easily done in Excel.

Tks…I could use that. I don’t suppose any one has a Glossary or something like the MSDN for Navision? For Progress = 1 to 100 if Progress = 100 then Progress = 0 Else Next Progress