Using Excel from Natural

Attached are examples and a start for routines which will allow Natural developers to create and use MS Excel workbooks from Natural. The routines only provide basic functionality, but the idea is to hide the “complexity” which will allow any Natural developer to use them without having to know about any of the objects being used.

These routines should be tested using the version of Excel that you have since the methods being used can be changed at any time by MS, an example of this is also provided and outlined in the “Excel Routines - Usage” document.

Have Fun!
Chad. (25.4 KB)

When I run EXL102EX I get the following error: EXL100RA 0500 NAT0736 The Natural object of class EXCEL.APPLICATION could not

And the line in EXL100RA looks like this: 000500 Create Object #EXL-Application Of Class “EXCEL.APPLICATION”

Could you help please?

Microsoft Excel must be installed on the same machine that the routines are used on, if it is already then it may be a different version than I have tested with.


Thanks for those great examples of accessing an Excel spreadsheet. I have got most of them to work however the one I am having a problem with is retrieving a value from a cell or a range of cells and passing them back to Natural.

Do you by any chance have some code which will do a read, or perhaps point me to a source for such information.


I took the (much) easier and simpler way out. I wrote the required script using VBScript and then call this from the Natural program. Works fine.