Excel Automation - insert row in Excel sheet

schedu
Member Posts: 12
Hi,
i am trying to insert a row in an excel sheet i create out of Navision.
I found a topic about excel with a function called "Selection.EntireRow.Insert"
viewtopic.php?t=927
Now i am trying to use this function but i cannot find it in any automation variables.
I can find Selection in the Properties of the Application variable, but as soon as i add ".entirerow.insert" I get an error that entirerow is an unknown variable.
Does anyone know how to solve this or post a function i can use to insert a new row and move all following rows down (in a preformated excel workbook created out of a template).
I am using the Excel Buffer Table from NAV 4.0 SP3 and the included automation variables.
Thanks!
Best regards,
schedu
i am trying to insert a row in an excel sheet i create out of Navision.
I found a topic about excel with a function called "Selection.EntireRow.Insert"
viewtopic.php?t=927
Now i am trying to use this function but i cannot find it in any automation variables.
I can find Selection in the Properties of the Application variable, but as soon as i add ".entirerow.insert" I get an error that entirerow is an unknown variable.
Does anyone know how to solve this or post a function i can use to insert a new row and move all following rows down (in a preformated excel workbook created out of a template).
I am using the Excel Buffer Table from NAV 4.0 SP3 and the included automation variables.
Thanks!
Best regards,
schedu
0
Answers
-
Is there anyone experienced with this who can help or give me a hint?0
-
I found a way how to solve this although I am not sure if it is the easiest way.
The worksheet and the cell can be "activated" and ActiveCell.Entirerow.Insert can then be used to insert a row below the activated cell.
XlApp: 'Microsoft Excel 14.0 Object Library'.Application
xlWrkSht: 'Microsoft Excel 14.0 Object Library'.WorksheetxlWrkSht.Activate; xlWrkSht.Range('C3').Activate; XlApp.ActiveCell.EntireRow.Insert;
Replies with easier solutions are still highly appreciated0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions