Transfer of data from Excel Buffer to Currency Exchange Rate

aashish1206
Member Posts: 4
Hi All,
Can somebody please let me know how to transfer data from Excel Buffer table to currency exchange table(No.330) using a codeunit.
In NAV 2009 SP1 ,We managed to import the data from Excel file to Excel Buffer table using the below functions,
Excelbuf.OpenBook(FileName,SheetName);
Excelbuf.ReadSheet;
Appreciate your help.
Thanks,
Ashish
Can somebody please let me know how to transfer data from Excel Buffer table to currency exchange table(No.330) using a codeunit.
In NAV 2009 SP1 ,We managed to import the data from Excel file to Excel Buffer table using the below functions,
Excelbuf.OpenBook(FileName,SheetName);
Excelbuf.ReadSheet;
Appreciate your help.
Thanks,
Ashish
0
Comments
-
Do you want to import from Excel to Curr table or you already imported to Excel Buffer and trying to move it to curr table?
I will explain it assuming you've already imported to buffer:
[*]First, it doesn't affect your code if it's written in a codeunit or any other object. Generally they will be similar.
[*]Create a function in a new or existing codeunit.
[*]Loop through Excel Buffer by repeat until.
[*]Map fields in a Init(or Clear) - Insert block.
Something like:ExcelBuffer.FINDSET; // use IF upon your requirements REPEAT CurrExchRate.INIT; CASE ExcelBuffer."Column No." OF 1: CurrExchRate.VALIDATE("Currency Code",ExcelBuffer."Cell Value as Text"); 2: //evaluate string to date and map to appropriate field ... ... END; CurrExchRate.INSERT; UNTIL ExcelBuffer.Next = 0;
Try to complete it yourself. If you couldn't succeed I can help you later...Ufuk Asci
Pargesoft0 -
Hi,
Thanks for your reply.You are right we have already imported the data into Excel buffer table and trying to transfer the data from Excel buffer table to Currency Exchange Rates(No. 330) table.
I will try this and let you know.
Appreciate your help.0 -
But in you case, we are converting only certain records not all the records. The data comes together in same keyfigure for both company code currency and also EUR currency. In this case you need to check manually and write code to convert it. So you will not be able to do with auto conversion. That applies to completely different scenario.
What you have done is the correct way.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