Link to home
Start Free TrialLog in
Avatar of Bruce Gust
Bruce GustFlag for United States of America

asked on

Excel Spreadsheet not opening up without password

I've got a page that my user can open up in Excel by copying and pasting the URL into the dialog box you get when you hit "Cmd-O" in Excel.

It's worked great until recently. Now it prompts my user for a password. There's nothing on the page that asks for that, yet Excel insists that they need to login.

What could cause that and how can I fix it?

BTW: It works fine when I do it on my computer - no problems. On her computer, it takes forever to load and then it requests a password.

Thoughts?

The code belonging to the page is below...

<?php

include("../carter.inc");
$cxn = mysqli_connect($host,$user,$password,$database)
or die ("couldn't connect to server");
$bruce="select org_name from organization where id = '$_GET[org_id]'";
$bruce_query = mysqli_query($cxn, $bruce)
or die("Couldn't execute query.");
$bruce_row=mysqli_fetch_assoc($bruce_query);
extract($bruce_row);
$the_org_name = stripslashes($org_name);
$org_id = $_GET['org_id'];
$today = date("m/d/Y");
?>


<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>The Rainmaker Academy | Revenue Action Plan</title>
<script language="javascript">AC_FL_RunContent = 0;</script>
<script src="AC_RunActiveContent.js" language="javascript"></script>
<script type="text/javascript" src="../swfobject.js"></script>
<link href="../stylesheet.css" rel="stylesheet" type="text/css" />
</head>

<body>


&nbsp;<BR>
<table width="800" cellspacing="3" cellpadding="3" border="1" align="center">
<tr>
<td colspan="2">
      <table cellspacing="0" cellpadding="0" width=100%>
      <tr>
      <td>
      <b>RAP Sheet for <?php echo $the_org_name; ?></b><BR>
      revenue for this marketing period up through <?php echo date("m/d/Y", strtotime($today)); ?>
      </td>
      </tr>
      </table>
</td>
</tr>
<tr>
<td colspan="2">
      <table border="0" width=100%>
      <tr>
      <td rowspan="2">
      Student Name
      </td>
      <td rowspan="2">
      Class Name
      </td>
      <td colspan="2" align="center">
      Actual Revenue
      </td>
      <td rowspan="2" background="images/spacer.gif" width="100" height="10">
      % of Goal
      </td>
      <td rowspan="2">
      Total Income
      </td>
      </tr>
      <tr>
      <td align="center" width="150">
      New
      </td>
      <td align="center" width="150">
      Existing
      </td>
      </tr>
      <?php
      $grand_new = 0;
      $grand_existing = 0;
      $grand_total=0;
      $michelle = "select * from students where organization = '$the_org_name' order by last_name";
      $michelle_query=mysqli_query($cxn, $michelle)
      or die("Couldn't execute query.");
      while($michelle_row=mysqli_fetch_assoc($michelle_query))
      {
      extract($michelle_row);
      $your_student_id = $id;
      ?>
      <tr>
      <td>
      <A HREF="student_activity_validate.php?id=<?php echo $your_student_id; ?>" target="_blank"><?php echo stripslashes($first_name).' '.stripslashes($last_name); ?></a>
      </td>
      <td>
      <?php
      if($class=="" OR $class==" " OR empty($class)){
      echo "&nbsp;<BR>";
      }
      else
      {
      echo stripslashes($class);
      }
      ?>
      </td>
      <td>$<?php
      $flinch="select SUM(actual_revenue) from revenue where student_id = '$your_student_id' and client_type<> 'Top 7 Client' AND client_type<>'Marketing'";
      $flinch_query=mysqli_query($cxn, $flinch)
      or die("Couldn't execute query.");
      $flinch_row = mysqli_fetch_assoc($flinch_query);
      $new_total = $flinch_row['SUM(actual_revenue)'];
      echo number_format(($new_total),0);
      $total_new_revenue = $new_total;
      $grand_new+=$total_new_revenue;
      ?>
      </td>
      <td>$<?php
      $bingo="select SUM(actual_revenue) from revenue where student_id = '$your_student_id' and client_type='Top 7 Client'";
      $bingo_query=mysqli_query($cxn, $bingo)
      or die("Couldn't execute query.");
      $bingo_row = mysqli_fetch_assoc($bingo_query);
      $current_total = $bingo_row['SUM(actual_revenue)'];
      echo number_format(($current_total),0);
      $total_existing_revenue = $current_total;
      $grand_existing +=$total_existing_revenue;
      ?>
      </td>
      <td><?php
      //estimated fees from revenue
      $esther = "select est_fee, probability FROM revenue where student_id = '$your_student_id'";
      $esther_query = mysqli_query($cxn, $esther)
      or die("Couldn't execute query.");
      $alan_goal=0;
      $alan_goal_total=0;
      while($esther_row=mysqli_fetch_assoc($esther_query))
      {
      extract($esther_row);
      $alan_goal = $est_fee*($probability/100);
      $alan_goal_total +=$alan_goal;
      }
      $alan_total = $alan_goal_total;
      $total_est_fee = $alan_total;
      $total_revenue = $total_existing_revenue + $total_new_revenue;
      $grand_total +=$total_revenue;
      //I've got to build in a way to accommdate those situations where there is no revenue, otherwise you get an error that says "division by zero"
            if(!$total_revenue==0)
            {
            $output = ($total_revenue / $total_est_fee)*100 ;
            echo number_format($output,2);
            }
            else
            {
            echo "0.00";
            }
      ?>%
      </td>
      <td>$<?php
      echo number_format($total_revenue,0);
      ?>
      </td>
      </tr>
      <?php
      }
      ?>
            <tr>
      <td colspan="6"><HR>
      </td>
      </tr>
      <tr>
      <td>
      Total New Revenue:
      </td>
      <td colspan="4">$
      <?php echo number_format($grand_new,0); ?>
      </td>
      </tr>
      <tr>
      <td>
      Total Existing Revenue:
      </td>
      <td colspan="4">$
      <?php echo number_format($grand_existing,0); ?>
      </td>
      </tr>
      <tr>
      <td>
      Grand Total:
      </td>
      <td colspan="4">$
      <?php echo number_format($grand_total,0); ?>
      </td>
      </tr>
      </table>
</td>
</tr>

</body>
</html>
ASKER CERTIFIED SOLUTION
Avatar of Andy Marshall
Andy Marshall
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Bruce Gust

ASKER

Rights haven't changed so that's not a problem.

What else could I do to connect to the server that constitutes a simpler approach?