ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Opening Excel 2000 Workbook in asp (https://www.excelbanter.com/excel-programming/297034-opening-excel-2000-workbook-asp.html)

KADE

Opening Excel 2000 Workbook in asp
 
Hi,
I've written code that opens an existing Excel file and
populates it with data from a database then closes it. I
tested it on my machine and it works fine (I have Office
XP installed), but when I port it to the server (which has
only Excel 2000 Sp3 installed), for some strange reason,
it always hangs at the point in where it's trying to open
the Excel file for edit.

Excel hangs and I usually have to stop it in task manager,
then I get the error code '800706be' on my browser for the
asp file. I've tried different things and I'm at a loss.
Any help would be much appreciated. The partial code is
below:


Set xlsApp = CreateObject("Excel.Application")
xlsApp.Visible = True
Set xlsBook = xlsApp.Workbooks.Open(xlsFile) *it hangs here

(xlsFile is a variable holding the filename and path of
the existing file)


K Dales

Opening Excel 2000 Workbook in asp
 
The obvious question: Is your file saved as an Excel 2000
file or is it Excel XP? If you are using Excel 2000 to
open the file (as you would be on the server) it probably
is having trouble recognizing the newer file format. If
possible, and if you haven't done it already, save the
file under 2000 format on the server.

-----Original Message-----
Hi,
I've written code that opens an existing Excel file and
populates it with data from a database then closes it. I
tested it on my machine and it works fine (I have Office
XP installed), but when I port it to the server (which

has
only Excel 2000 Sp3 installed), for some strange reason,
it always hangs at the point in where it's trying to open
the Excel file for edit.

Excel hangs and I usually have to stop it in task

manager,
then I get the error code '800706be' on my browser for

the
asp file. I've tried different things and I'm at a

loss.
Any help would be much appreciated. The partial code is
below:


Set xlsApp = CreateObject("Excel.Application")
xlsApp.Visible = True
Set xlsBook = xlsApp.Workbooks.Open(xlsFile) *it hangs

here

(xlsFile is a variable holding the filename and path of
the existing file)

.


KADE

Opening Excel 2000 Workbook in asp
 
Hi K. Dales
I actually saved the file down as a Microsoft Excel 97 (Excel 5.0,7.0) format (so older and newer versions can open it), so no, it's not saved as an Office XP file.

K Dales

Opening Excel 2000 Workbook in asp
 
Just had to check the most likely problem. Not sure then
why it hangs. What is the behavior on the server when it
hangs? Since you have set xlsApp.Visible it should be
visible on screen at that point. Do you get a partially
painted window? I have found that Excel 2000 hangs for me
when I try to open a file, leaving a partially painted
window, if there is a "rogue" Excel session left over
somewhere in memory. Just grasping at straws here...

K Dales

-----Original Message-----
Hi K. Dales,
I actually saved the file down as a Microsoft Excel 97

(Excel 5.0,7.0) format (so older and newer versions can
open it), so no, it's not saved as an Office XP file.
.


KADE

Opening Excel 2000 Workbook in asp
 
Thanks again for the reply. Surprisingly, the Excel window doesn't show up when the script runs, which is strange. I actually just have Excel 2000 installed on the server - do you think I need to install the full Office suite?

K Dales

Opening Excel 2000 Workbook in asp
 
You should not need the full office suite, but you do need
to make sure the VBA files are there. Perhaps there are
some .dll files missing that prevent your code from
running - it is worth investigating.

-----Original Message-----
Thanks again for the reply. Surprisingly, the Excel

window doesn't show up when the script runs, which is
strange. I actually just have Excel 2000 installed on the
server - do you think I need to install the full Office
suite?
.


KADE

Opening Excel 2000 Workbook in asp
 
what dlls would I be looking for



K Dales

Opening Excel 2000 Workbook in asp
 
Try this: From your VBA editor, go to the Tools menu and
then References. Highlight any of them that are checked
off and at the bottom of the dialog you will see the
actual file path used by that reference. Then check the
server for the same.

-----Original Message-----
what dlls would I be looking for?


.


KADE

Opening Excel 2000 Workbook in asp
 
Still having the problems...


All times are GMT +1. The time now is 05:38 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com