How to Create New Excel Sheet

amrit010
Member Posts: 4
Hi,
If the entries that are exported to excel have exceeded more than 1048576 entries then automatically, create a new sheet and enter the data in the new sheet?
Is it possible?
I tried the below link, but couldn't succeed, by writing doing my own customization.
https://saurav-nav.blogspot.com/2015/07/nav-2013-r2-multiple-sheets-in-excel.html
My aim is to extract Data of Item Ledger Entries without any filter, if the entries exceed the limit of excel sheet rows, i.e 1048576, then a data must get created in new sheet?/
Thanks in Advance
If the entries that are exported to excel have exceeded more than 1048576 entries then automatically, create a new sheet and enter the data in the new sheet?
Is it possible?
I tried the below link, but couldn't succeed, by writing doing my own customization.
https://saurav-nav.blogspot.com/2015/07/nav-2013-r2-multiple-sheets-in-excel.html
My aim is to extract Data of Item Ledger Entries without any filter, if the entries exceed the limit of excel sheet rows, i.e 1048576, then a data must get created in new sheet?/
Thanks in Advance
0
Answers
-
In the blog entry you've mentioned there is a code sample how to create additional worksheet. You can use it to modify Excel Buffer function to create new spreadsheed after writting 1m+ line, or you can use Exce Buffer code + examples from the blog to write your own function to export directly from Item Ledger Entry. The idea here would be to create new worksheet writer in the middle of Write loop, and keep writting in the loop to the new worksheet var (resetting the row counter the new spreadsheet will be filled up from row 1).
So the answer is yes, it is possible, but does it make any sense? Having a 1m+ entries spreadsheet opened in Excel will make the app crawl, most likely almost unusable. Try creating manually a dummy spreadsheed and fill it up with 1m+ rows resembling the content exported from the Item Ledger Entry and test this before writting any code.
If you think about exporting item ledger entries in order to copy them to another database then a flat file will be probably a better option (still being most likely unopenable/uneditable in most text editors)
Slawek Guzek
Dynamics NAV, MS SQL Server, Wherescape RED;
PRINCE2 Practitioner - License GR657010572SG
GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-030
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