You need to add some more error-checking. I suspect that your $Excel object never gets created right. You can do something like this after creating it:
If you get that error, you have an Excel COM-object registration problem.$Excel or die "Excel object not created\n";
The other issue is that the file and path to the workbok are hard-coded, and you don't check for file existance before opening it. Add this before opening the file:
You should also check the contents of the form, and complain to the user if they are empty. This is not just for "user friendly"-ness - it can also help diagnose cases where your script is called from an unexpected place, without passing form info.die "Missing excel Workbook" unless -e "D:\\andreas\\perl\\squash.xls +";
This is just a start toward writing "good" code - there are several other programming technequies in your code that need improvement - this is just enough info to get you started.
In reply to Re: Script works on WinXp & win98 but not Win2000
by NetWallah
in thread Script works on WinXp & win98 but not Win2000
by Jargo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |