Excel exportation-report-Excel Buffer 370 Record more sheet

andy76
Member Posts: 616
Hello,
I have used the record 370 Excel Buffer to export various report developed
ad hoc.
For one of them I have to create 4 sheets on same file. I made some test but
I can not solve that.
This is an example of my code:
TempExcelBuffer.CreateBook;
TempExcelBuffer.CreateSheet('My sheet 1','My sheet
1'Ordini',COMPANYNAME,USERID);
// I inserted others new record in Excel Buffer wanting to have them in 'My
sheet 2'
TempExcelBuffer.CreateSheet('My sheet 2','My sheet 2',COMPANYNAME,USERID);
TempExcelBuffer.GiveUserControl;
but all my records are then exported in My sheet 2 and My sheet 1 is not
considered.
How can I solve that?
Thank you
I have used the record 370 Excel Buffer to export various report developed
ad hoc.
For one of them I have to create 4 sheets on same file. I made some test but
I can not solve that.
This is an example of my code:
TempExcelBuffer.CreateBook;
TempExcelBuffer.CreateSheet('My sheet 1','My sheet
1'Ordini',COMPANYNAME,USERID);
// I inserted others new record in Excel Buffer wanting to have them in 'My
sheet 2'
TempExcelBuffer.CreateSheet('My sheet 2','My sheet 2',COMPANYNAME,USERID);
TempExcelBuffer.GiveUserControl;
but all my records are then exported in My sheet 2 and My sheet 1 is not
considered.
How can I solve that?
Thank you
0
Comments
-
viewtopic.php?f=23&t=24087
Once you add the AddSheet function to your excel buffer table as explained in the link above
then you can addOnPostDataItem() Window.CLOSE; TempExcelBuffer.CreateBook; TempExcelBuffer.AddSheet; TempExcelBuffer.CreateSheet('MySheet4','MySheet4',COMPANYNAME,USERID); TempExcelBuffer.AddSheet; TempExcelBuffer.CreateSheet('MySheet3','MySheet3',COMPANYNAME,USERID); TempExcelBuffer.AddSheet; TempExcelBuffer.CreateSheet('MySheet2','MySheet2',COMPANYNAME,USERID); TempExcelBuffer.AddSheet; TempExcelBuffer.CreateSheet('MySheet1','MySheet1',COMPANYNAME,USERID); TempExcelBuffer.GiveUserControl;
Giving you 4 of the same sheets
Sample Export Report---> http://savatage99.googlepages.com/Repor ... ToExce.txt0 -
Ok, thank you, I could create 4 sheets but all with same records (rows and colums) of first one.
I have to create the excel with for ex. 10 columns on 1 sheet and this is done ok (choice 1).
And then they want, with another selection, an excel having the first 6 columns in all 4 sheets and 1 only additional column for each sheets (choice 2).
(choice 1)
columns A B C D E F G H I L all on 1 sheet ok
(choice 2)
columns A B C D E F G on sheet 1
columns A B C D E F H on sheet 2
columns A B C D E F I on sheet 3
columns A B C D E F L on sheet 4
Do you understand?
I though to create a new function in Record 370 called DeleteColumn in which I could delete/hidden the other columns.
The Macro Excel is for example:
Columns("H:H").Select
Selection.Delete Shift:=xlToLeft
Is it possible to make a similar function in Record 370. How?
Thank you very much0 -
Oh I was going on your post...For one of them I have to create 4 sheets on same file. I made some test but
I can not solve that0 -
Sorry, I don't understand your last reply.
Isn't that possible or is it difficult?
Thank you0 -
Savatage wrote:Oh I was going on your post...For one of them I have to create 4 sheets on same file. I made some test but
I can not solve that
The last reply was basically saying - that you said your problem was creating 4 of the same sheets hence the solution I provided.
The deleting columns thing is different and I wish I was an excel buffer expert but I'm notHopefully someone else will chime in with that part of your goal.
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