Operating System - HP-UX
1827903 Members
1710 Online
109970 Solutions
New Discussion

viewing Excel file via the web

 
Thi Vu
Frequent Advisor

viewing Excel file via the web

Hi there,

Can you please help me with this problem. We a an internal web page with posted procedures and reports for staff across the regions. For the past few weeks, all of a sudden users can not view their "Excel (xls)" reports. When I went in and open to view the Excel file - all I see is the mumble jumble/code/figure. Below is the code from the script to view "xls" file:

elif [ "$action" = "XLS" ] ; then
echo "Content-Description: Reports Archive Web Site - MsExcel Viewer"
echo "Content-Disposition: inline; filename=$tfile"
echo "Content-Disposition: attachment; filename=$tfile"
echo "Content-type: application/x-msexcel; name=$tfile\n"
if [ "$compressYN" = "YES" ] ; then
$zcat $path/$file | sed 's/^L/ /g'
else
cat $path/$file | sed 's/^L/ /g'
fi

A couple of month ago I ran into this same problem and before I can go into the script to take a look at what's wrong - the report is magically "viewable" again. I checked the script against the hard copy and there was no changes to it since 1998.

I greatly appreciate any help. Thank you
Thi
4 REPLIES 4
David Mabo_1
Advisor

Re: viewing Excel file via the web

Check your permissions.
Marcel_3
New Member

Re: viewing Excel file via the web

Hi,

There are several things it might be. The most obvious is permissions - looks like it should be runnig a script so that'll have to be executable.

How are you runing the report? If it's using SSI perhaps your web server configuration needs checking.

Hope this helps,

Marcel
Thi Vu
Frequent Advisor

Re: viewing Excel file via the web

I checked the file's and the script's permission. They are all : rwxr-xr-x.

I tested the script at the command line and there was no complain except I can see some of the text and the rest are in code (Excel) - same old problem. Again thank you all for your help.
Dave Chamberlin
Trusted Contributor

Re: viewing Excel file via the web

Just a suggestion - Excel can save a worksheet as an HTML document. You can later edit the HTML documnent with Excel to make changes. Thats how we post some Excel data on our website and it keeps things simple.