CopySheet functionality in Export to excel
mobilenav
Member Posts: 6
Hi,
I have created multiple sheets based on locations from NAV using the Excel buffer functionality. Now, i need to copy the rows and columns from one sheet to another similar to copysheet. Is this possible?
Thanks in advance.
I have created multiple sheets based on locations from NAV using the Excel buffer functionality. Now, i need to copy the rows and columns from one sheet to another similar to copysheet. Is this possible?
Thanks in advance.
0
Answers
-
Add this function to the 370 table:
AddNewSheet(SheetName : Text[250])
XlWrkShtWriter := XlWrkBkWriter.AddWorksheet(SheetName);
IF SheetName <> '' THEN BEGIN
XlWrkShtWriter.Name := SheetName;
ActiveSheetName := SheetName;
END;
CurrentRow:=0;
CurrentCol:=0;
The program flow should be like:
ExcelBuffer.DELETEALL;
CLEAR(ExcelBuffer);
FilenameServer:='';
ExcelBuffer.CreateBook(FilenameServer,'asdf');
ExcelBuffer.AddColumn('qwer',FALSE,'',FALSE,FALSE,FALSE,'',ExcelBuffer."Cell Type"::Text);
ExcelBuffer.AddColumn('zxcv'),FALSE,'',FALSE,FALSE,FALSE,'',ExcelBuffer."Cell Type"::Text);
ExcelBuffer.NewRow;
ExcelBuffer.WriteSheet('sheet1',COMPANYNAME,USERID);
ExcelBuffer.DELETEALL;
ExcelBuffer.AddNewSheet('sheet2');
ExcelBuffer.AddColumn('p',FALSE,'',FALSE,FALSE,FALSE,'',ExcelBuffer."Cell Type"::Text);
ExcelBuffer.AddColumn('o',FALSE,'',FALSE,FALSE,FALSE,'',ExcelBuffer."Cell Type"::Text);
ExcelBuffer.NewRow;
ExcelBuffer.WriteSheet('Pedidos',COMPANYNAME,USERID);
ExcelBuffer.DELETEALL;
ExcelBuffer.AddNewSheet('sheet3');
.
.
.
.
.
.
.
.
Giving thanks is always wellcome1 -
Hi,
Thanks for the response. This is like we manually insert the data into each sheet through addcolumn. I need something like copying Sheet 1 data to Sheet 2 and so on.
It should be like copysheet(Sheet1,Sheet2). Can we do Something like this in navision using the excel buffer?
Thanks in advance0 -
I don't know then but probably not directly… U can use another table like a buffer and from that copy data with my functions but… it is no efficient.
Excel buffer has his limits xd…
I wish u lucky
Giving thanks is always wellcome0
Categories
- All Categories
- 75 General
- 75 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K 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
- 610 NAV Courses, Exams & Certification
- 1.9K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 251 Dynamics CRM
- 103 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions