SHAZAM Community
Ask Your Question

How can I use Excel spreadsheets with SHAZAM?

asked 2011-03-12 05:56:25 +0000

A SHAZAM User Asked:

What is wrong with the following code?

sample 1 352
read (C:\Users\name\Desktop\rice.xls) firm year prod area labor fert / list

The output is:

|_read (C:\Users\name\Desktop\rice.xls) firm year prod area labor fert / list
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2011-03-12 06:41:25 +0000

David gravatar image

updated 2015-09-21 12:41:10 +0000

This is probably happening because the variable names are not listed on the first row of the spreadsheet, or the spreadsheet name has not been specified.

If the worksheet is not named 'Sheet1' then the name of the sheet should be specified as shown here.

read (C:\Users\name\Desktop\rice.xls|TheSheetName) firm year prod area labor fert / list

A guide to using Excel with SHAZAM versions 9 and 10 is also available here which may help you.

Please see Method 3) which demonstrates the way to use Excel using the READ statement in both the Standard and Professional Editions.

In SHAZAM Version 10 (Service Pack 1) there is a sample spreadsheet in the SHAZAM directory and this can be tested using these commands:

read(c:\shazam\sample.xls|SampleSheet) Igm Fgm Cgm Ic Fc Cc
stat /all

Note also that many versions of Excel open spreadsheets exclusively preventing software like SHAZAM from reading them while Excel has them open. If this happens you will need to close the spreadsheet in Excel before attempting to read it into SHAZAM.

You may also export spreadsheets using the Data Interchange Format (.dif) which is a long established common format for exchanging data between spreadsheets. This can be combined with the /NAMES option which is useful when there are a large number of variables because they do not need to be listed with the READ statement. This is described in the SHAZAM manual.

edit flag offensive delete link more


In SHAZAM 11 support for reading Excel spreadsheets using the READ statement has been removed. Instead use the 'Open' button within the SHAZAM Environment to load the file within the Data Editor. Use the Add to Workspace button and SHAZAM will import and automatically read the data for you.

SHAZAMHelp gravatar imageSHAZAMHelp ( 2014-01-17 07:56:33 +0000 )edit
Login/Signup to Answer

Question Tools


Asked: 2011-03-12 05:56:25 +0000

Seen: 2,739 times

Last updated: Sep 21 '15