Downloading and Installing stata2htm
These notes show how to download and use the tool stata2htm that ATS has
developed to make it easy to convert a Stata .log file into a web page.
- Download the files.
Click on stata2htm.zip and unzip it. When it asks you "Unzip to folder?" we will assume you
choose c:\stata2htm . If you install it
somewhere different, then replace c:\stata2htm
to the name of the directory where you stored this file.
- Install Perl
(If you installed sas2htm and installed perl, you can skip
this step.)
One of the files extracted into c:\stata2htm will be called pw32i316.exe
. Double click on that file which will install perl on your machine. You can
install this into any directory you choose, but we will assume you install
it in c:\perl
. Wherever you see us refer to c:\perl you can replace that
with the directory that you chose.
The installation program will questions about
installing it, and the default should be fine for all
of the questions. The most important question is "Modify search
path?", and you should answer yes. This will make it easy
to find the tools needed for running stata2htm.
- Move the stata2htm files to the Perl Folder
In the c:\stata2htm folder you will find the files stata2htm.bat
and stata2htm.pl . Move these files from c:\stata2htm to c:\perl\bin
.
- Edit stata2htm.bat
Use notepad (or any other text editor) to open up the file stata2htm.bat
that is located in your c:\perl\bin directory . It will look
like this...
c:\perl\bin\perl c:\perl\bin\stata2htm.pl %1.log %1.htm
If you installed perl in a place other than c:\perl, change c:\perl
to the name of the location where you installed perl.
- Reboot your computer (so the search path can be updated).
- Test stata2htm
Start a Dos Window (e.g. click start then programs then command
prompt). Then type
cd c:\stata2htm
You can then try converting the sample .log file sample.log to sample1.htm by typing
stata2htm sample
This should then create sample.htm.