Problem on using Excel automation in C/AL

Cem_Karaer
Member Posts: 281
Here is the problem: I try to extract data from an Excel sheet by using Excel automation objects, namely Excel application object, worksheet object and range object. But when I encounter an empty cell on the sheet, value property of the range object returns nothing!! C/AL doesn't even execute an assignment statement. How can I handle this? I tried to find if there is any way to check that the return value is null, empty or something like it, I found no function for this.
Cem Karaer @ Pargesoft
Dynamics NAV Developer since 2005
Dynamics NAV Developer since 2005
0
Answers
-
Check T370:"Excel Buffer". This table has some code in it to import/export data from/to Excel.
Maybe you can use this to receive the information from Excel. Or maybe in the code in the table, you can find how to do it.Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
Hi
The problem is that Navision doesn't accept NULL values.
Try using Variant variables.
Variant1 := Excell......
Thne, use Variant variable function to know wath type of data is
if variant1.ISINTEGER THEN
begin
end;
if variant1.ISTEXT then
begin
end;
I had similar problen reading access databases and that was my problem solution
Bye0 -
Thank you for your help.Cem Karaer @ Pargesoft
Dynamics NAV Developer since 20050
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