Export to Excel on multi-worksheets using the Excel Buffer

Prashanthbluestar
Member Posts: 3
Hi All,
I want to export the data to an excel sheet,over different worksheets using Excel buffer or any other method(If any).
I am able to get the data over a single worksheet but i want the data to spread across multiple worksheets.So,How can i achieve this....
Is there any function capable of doing the above.... please help me out with this.... ](*,)
Regards,
Prashanth Sanath
I want to export the data to an excel sheet,over different worksheets using Excel buffer or any other method(If any).
I am able to get the data over a single worksheet but i want the data to spread across multiple worksheets.So,How can i achieve this....
Is there any function capable of doing the above.... please help me out with this.... ](*,)
Regards,
Prashanth Sanath
Late nights at office priceless,for everything else salary is not enough!!
0
Comments
-
Creating a new sheet in an existing book can be done like this:
clear(ExcelApp); Create(ExcelApp); ExcelBook:=ExcelApp.Workbooks.Add(); ExcelSheet:=ExcelApp.ActiveSheet; ExcelSheet.Name:='Name1'; ExcelSheet.Range('A1').Value:='Headline1'; // 2nd Sheet ExcelSheet:=ExcelBook.Sheets.add(); ExcelSheet:=ExcelApp.ActiveSheet; ExcelSheet.Name:='Name2'; ExcelSheet.Range('A1').Value:='Headline2';
Variables are:
ExcelApp: Automation 'Microsoft Excel 11.0 Object Library'.Application
ExcelBook: Automation 'Microsoft Excel 11.0 Object Library'.Workbook
ExcelSheet : Automation 'Microsoft Excel 11.0 Object Library'.Worksheet
Variables of these types ared use in the table Excel Buffer, so you can add a function there or create the Excelbook by using your own code0 -
it's not possible with buffer, you have to take make modification.
Even if you call the create sheet with different parameters, navision buffer excel creates one sheet with last sheetname0 -
ara3n wrote:it's not possible with buffer, you have to take make modification.
Even if you call the create sheet with different parameters, navision buffer excel creates one sheet with last sheetname
Thanx for the reply.
Well if u tell that it's not possible using the EXCEL BUFFER then is it possible through anyother method?Late nights at office priceless,for everything else salary is not enough!!0 -
Yes, modify the excel buffer and add the functionality for mutiple worksheet.0
-
The code you want is above \:D/0
-
Hello,
I want to get an Excel workbook with 3 sheets but I am using the ExcelBuffer table and a report to export my data.
I don't know how to mak it work
Anyone can help me???? :oops:
Regards
Hanen TALBI0 -
you can't use excel buffer "as is" for multi sheets export (as you probably have read in previous posts).
You can modify the excel buffer table adding a new field with sheet name and then implement one or more functions to redirect the export (i would NOT go for this, anyway)
OR:
you can search mibuso for the instructions to write to multiple sheets. (e.g. McClane code you can read above)
I don't recommend you to modify the excel buffer because you'll have to upgrade it every release and also the code is a little hard to read (in my opinion), so it will take a lot of time and tests to have it working. Remember that the buffer is also used from other standard processes, and you don't want them to fail, isn't it?
And i just remember that the key of the table is "Row no.", "Col no."...with multiple sheets, you have to extend the key with the new "worksheet no." filed, too!0
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