473,396 Members | 2,076 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

problem with excel

Hi!

I looked around here for ole automation with excel, and put this
togther, which give this error:

Parse error: parse error, unexpected T_VARIABLE in C:\Inetpub\wwwroot
\JOTIntranet\Modules\changebrowser\excel2.php on line 14 (14= save
as).

I have tried a number of thigs, but cannot make this work... and not
figure out what it is
<?php
$excel = new COM("excel.application") or die("unable to instantiate
MSExcel");

//Ignore Alerts
$excel->DisplayAlerts = 0;
//Make Excel Visible
$excel->Visible = 1;
//Create a new workbook
$WB = $excel->Workbooks->Add;

$OutputFilename=dirname(__FILE__)."\\test_excel2.x ls"

$excel->ActiveWorkbook->SaveAs("test_excel2.xls");

//Clean up and close, quit, release
$WB->Close();
//unset($WS);
unset($wB);
$excel->Workbooks->Close();
$excel->Quit();
unset($excel);
?>

Mar 16 '07 #1
2 1409
Rik
On Fri, 16 Mar 2007 14:52:49 +0100, Sonnich
<so************@elektrobit.comwrote:
Hi!

I looked around here for ole automation with excel, and put this
togther, which give this error:

Parse error: parse error, unexpected T_VARIABLE in C:\Inetpub\wwwroot
\JOTIntranet\Modules\changebrowser\excel2.php on line 14 (14= save
as).
([13]) $OutputFilename=dirname(__FILE__)."\\test_excel2.x ls"
And the line with ';'........
--
Rik Wasmus
Mar 16 '07 #2
On Mar 16, 3:56 pm, Rik <luiheidsgoe...@hotmail.comwrote:
On Fri, 16 Mar 2007 14:52:49 +0100, Sonnich

<sonnich.jen...@elektrobit.comwrote:
Hi!
I looked around here for ole automation with excel, and put this
togther, which give this error:
Parse error: parse error, unexpected T_VARIABLE in C:\Inetpub\wwwroot
\JOTIntranet\Modules\changebrowser\excel2.php on line 14 (14= save
as).
([13]) $OutputFilename=dirname(__FILE__)."\\test_excel2.x ls"

And the line with ';'........
I am an idiot. It is Friday. Should go home a have a beer.

Thanks
Sonnich

Mar 16 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Jeremy | last post by:
Hi, I have a webpage that is taking input from a form and using it as criteria to select data out of an sql database. The page displays an html table with the results. The user can then click a...
3
by: Spacy | last post by:
Am creating a HTML Report in asp.net. To save this report to excel on client-side, i write this code: Response.ContentType = "application/vnd.ms-excel" Response.AddHeader("content-disposition",...
8
by: mytfein | last post by:
Hi Everyone, Background: Another department intends to ftp a .txt file from the mainframe, for me to process. The objective is to write a vb script that would be scheduled to run daily to...
2
by: Steve Chatham | last post by:
I use the following code: Private Sub RbtnExport_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RbtnExport.SelectedIndexChanged Dim sFile As String =...
3
by: Eyal Zinder | last post by:
Hello All, Here is a little problem I ran into. I'd like to see if anyone can help me solve it I have an HTML table that I assign to a label control. I set my Response.ContentType =...
2
by: Praveen K | last post by:
I have a problem in communicating between the C# and the Excel Interop objects. The problem is something as described below. I use Microsoft Office-XP PIA dll’s as these dll’s were been...
4
by: msnnews.msn.com | last post by:
hi there, i've got a form that populates a datagrid, and a button that calls a function to export to an excel file. All is well with the export, no errors are returned, but the Excel instance...
5
by: Scott M. Lyon | last post by:
I've just discovered a bug in some code I wrote a little while ago, and I need you guys' help to fix it. My program imports data from a standard Excel Spreadsheet (just with specific column...
6
by: Darrell Wesley | last post by:
A VB2003 application upgraded to VB2005 that builds an Excel spreadsheet. Everything appears to work correctly except that the Excel object does not go away it is still in the Process list in task...
6
by: Michael Groeger | last post by:
Hi, I have an aspx page which generates an excel document and transfers it to the browser as attachment. Normally, once the document is transferred the open save dialog prompts to open or save...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.