<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wikidot="http://www.wikidot.com/rss-namespace">

	<channel>
		<title>Instantiating an Excel Object from Peoplesoft page</title>
		<link>http://www.peoplesoftwiki.com/forum/t-172406/instantiating-an-excel-object-from-peoplesoft-page</link>
		<description>Posts in the discussion thread &quot;Instantiating an Excel Object from Peoplesoft page&quot; - Error on ObjectGetProperty statement</description>
				<copyright></copyright>
		<lastBuildDate>Mon, 06 Feb 2012 22:15:15 +0000</lastBuildDate>
		
					<item>
				<guid>http://www.peoplesoftwiki.com/forum/t-172406#post-1206400</guid>
				<title>(no title)</title>
				<link>http://www.peoplesoftwiki.com/forum/t-172406/instantiating-an-excel-object-from-peoplesoft-page#post-1206400</link>
				<description></description>
				<pubDate>Wed, 20 Jul 2011 21:06:10 +0000</pubDate>
				<wikidot:authorName>Praj</wikidot:authorName>				<wikidot:authorUserId>52320</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Thanks for those tips.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://www.peoplesoftwiki.com/forum/t-172406#post-1205010</guid>
				<title>(no title)</title>
				<link>http://www.peoplesoftwiki.com/forum/t-172406/instantiating-an-excel-object-from-peoplesoft-page#post-1205010</link>
				<description></description>
				<pubDate>Tue, 19 Jul 2011 08:33:30 +0000</pubDate>
				<wikidot:authorName>Jitender Rawat</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>Hi,</p> <p>The pre/requisite to use Excel API class is are:<br /> 1) Should be run in a windows env. Hence the batch server should be windows, in Unix these commands will not work<br /> 2) MS Excel should be installed in the windows machine. If not, then calling createobject for Excel application will throw exceptions since there is no underlying excel libraries to handle the call.</p> <p>To test your AE works or not, you can try running AE in 2 tier i.e directly from Application designer assuming your work env machine is windows with excel installed. The code should work properly there.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://www.peoplesoftwiki.com/forum/t-172406#post-1138255</guid>
				<title>(no title)</title>
				<link>http://www.peoplesoftwiki.com/forum/t-172406/instantiating-an-excel-object-from-peoplesoft-page#post-1138255</link>
				<description></description>
				<pubDate>Thu, 28 Apr 2011 05:47:31 +0000</pubDate>
				<wikidot:authorName>andi</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>may be you don't have microsoft excel installed on your server that running this app engine. i got the same error, before i install the ms excel in my server. CMIIW ^^</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://www.peoplesoftwiki.com/forum/t-172406#post-1024733</guid>
				<title>(no title)</title>
				<link>http://www.peoplesoftwiki.com/forum/t-172406/instantiating-an-excel-object-from-peoplesoft-page#post-1024733</link>
				<description></description>
				<pubDate>Fri, 04 Mar 2011 03:17:23 +0000</pubDate>
				<wikidot:authorName>Praj</wikidot:authorName>				<wikidot:authorUserId>52320</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>As per other posts, looks like the following line:</p> <div class="code"> <pre> <code>&amp;oWorkApp = CreateObject("COM", "Excel.Application");</code> </pre></div> <p>Is not working, which PeopleTools version are you running?</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://www.peoplesoftwiki.com/forum/t-172406#post-1023041</guid>
				<title>(no title)</title>
				<link>http://www.peoplesoftwiki.com/forum/t-172406/instantiating-an-excel-object-from-peoplesoft-page#post-1023041</link>
				<description></description>
				<pubDate>Thu, 03 Mar 2011 14:56:55 +0000</pubDate>
				<wikidot:authorName>Gopinath</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>When i executing Appengine i got following error</p> <p>First operand of . is NULL, so cannot access member DispalyAlerts. (180,236) DS_PC_APP.MAIN.GBL.default.1900-01-01.Step02.OnExecute PCPC:188 Statement:2<br /> Message Set Number: 180<br /> Message Number: 236<br /> Message Reason: First operand of . is NULL, so cannot access member %1. (180,236)</p> <p>Process 1549 ABENDED at Step DS_PC_APP.MAIN.Step02 (PeopleCode) — RC = 8 (108,524)<br /> Message Set Number: 108<br /> Message Number: 524<br /> Message Reason: Process 1549 ABENDED at Step DS_PC_APP.MAIN.Step02 (PeopleCode) — RC = 8 (108,524)</p> <p>Process %s ABENDED at Step %s.%s.%s (Action %s) — RC = %s</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://www.peoplesoftwiki.com/forum/t-172406#post-1007716</guid>
				<title>(no title)</title>
				<link>http://www.peoplesoftwiki.com/forum/t-172406/instantiating-an-excel-object-from-peoplesoft-page#post-1007716</link>
				<description></description>
				<pubDate>Mon, 21 Feb 2011 08:49:25 +0000</pubDate>
				<wikidot:authorName>Praj</wikidot:authorName>				<wikidot:authorUserId>52320</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>I tried your code, and it works fine for me - for some reason it isn't picking up the <tt>Excel.Application</tt> COM object. Which version of PeopleTools are you on?</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://www.peoplesoftwiki.com/forum/t-172406#post-1007713</guid>
				<title>(no title)</title>
				<link>http://www.peoplesoftwiki.com/forum/t-172406/instantiating-an-excel-object-from-peoplesoft-page#post-1007713</link>
				<description></description>
				<pubDate>Mon, 21 Feb 2011 08:44:17 +0000</pubDate>
				<wikidot:authorName>Praj</wikidot:authorName>				<wikidot:authorUserId>52320</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Looks like the <tt>&amp;oWorkApp</tt> object is not being instantiated properly, has that object been declared in your code?</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://www.peoplesoftwiki.com/forum/t-172406#post-1007657</guid>
				<title>(no title)</title>
				<link>http://www.peoplesoftwiki.com/forum/t-172406/instantiating-an-excel-object-from-peoplesoft-page#post-1007657</link>
				<description></description>
				<pubDate>Mon, 21 Feb 2011 06:13:11 +0000</pubDate>
				<wikidot:authorName>Rikhav</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>I am facing the same issue. Can you please guide me what was done to fix this issue? for the below metioned code I m getting the following error when the AE program is run in 2 tier mode:</p> <p>try<br /> &amp;oWorkApp = CreateObject("COM", "Excel.Application");<br /> &amp;oWorkApp.DisplayAlerts = "False";<br /> &amp;oWorkBook = ObjectGetProperty(&amp;oWorkApp, "Workbooks");<br /> &amp;oWorkBook.Open("C:\temp\template.xls");<br /> &amp;oWorkSheet = &amp;oWorkApp.Worksheets("Sheet1");<br /> &amp;oWorkApp.ActiveWorkBook.SaveAs("C:\temp\your_output_file.xls");<br /> /* then go crazy with your worksheet object */<br /> /* eg */<br /> &amp;oWorkSheet.Cells(1, 1).Value = "I'm adding stuff to be bolded";<br /> &amp;oWorkSheet.Cells(1, 1).Font.Bold = True;<br /> /* Save Excel file and quit */<br /> &amp;oWorkApp.ActiveWorkBook.Save();<br /> &amp;oWorkApp.ActiveWorkBook.Close();<br /> &amp;oWorkApp.DisplayAlerts = "True";<br /> &amp;oWorkApp.Quit();<br /> catch Exception &amp;c1<br /> MessageBox(0, "", 0, 0, "Caught exception: " | &amp;c1.ToString());<br /> end-try;</p> <p>ERROR RECEIVED -<br /> Caught exception: First operand of . is NULL, so cannot access member DisplayAlerts. (180,236)</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://www.peoplesoftwiki.com/forum/t-172406#post-960001</guid>
				<title>(no title)</title>
				<link>http://www.peoplesoftwiki.com/forum/t-172406/instantiating-an-excel-object-from-peoplesoft-page#post-960001</link>
				<description></description>
				<pubDate>Tue, 28 Dec 2010 13:02:35 +0000</pubDate>
				<wikidot:authorName>Jimmy</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>Hi,</p> <p>I need to create more than one sheet on excel, anyone can help me?</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://www.peoplesoftwiki.com/forum/t-172406#post-880873</guid>
				<title>(no title)</title>
				<link>http://www.peoplesoftwiki.com/forum/t-172406/instantiating-an-excel-object-from-peoplesoft-page#post-880873</link>
				<description></description>
				<pubDate>Fri, 24 Sep 2010 13:40:37 +0000</pubDate>
				<wikidot:authorName>Samidha</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>Hi,</p> <p>I want to use this piece of code on my page on the hyperlink.</p> <p>Local object &amp;oWorkApp, &amp;oWorkBook;<br /> &amp;oWorkApp = CreateObject("COM", "Excel.Application");<br /> &amp;oWorkApp.DisplayAlerts = "False";<br /> &amp;oWorkBook = ObjectGetProperty(&amp;oWorkApp, "Workbooks");<br /> &amp;oWorkBook.Open("C:\some_path_to\template.xls");<br /> &amp;oWorkSheet = &amp;oWorkApp.Worksheets("Sheet1");<br /> &amp;oWorkApp.ActiveWorkBook.SaveAs("C:\your_output_file.xls");</p> <p>But when I click on the link it gives me the error 'Class COM not found. The given class is not found in the database or having problems to access it.'</p> <p>Please help.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://www.peoplesoftwiki.com/forum/t-172406#post-720121</guid>
				<title>Re: Manipulating Excel Object in PeopleCode</title>
				<link>http://www.peoplesoftwiki.com/forum/t-172406/instantiating-an-excel-object-from-peoplesoft-page#post-720121</link>
				<description></description>
				<pubDate>Wed, 10 Mar 2010 14:26:17 +0000</pubDate>
				<wikidot:authorName>hfjf</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p><a href="http://peoplesoft.wikidot.com/generating-a-csv-file-from-sqr">http://peoplesoft.wikidot.com/generating-a-csv-file-from-sqr</a></p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://www.peoplesoftwiki.com/forum/t-172406#post-718207</guid>
				<title>Re: Instantiating an Excel Object from Peoplesoft page</title>
				<link>http://www.peoplesoftwiki.com/forum/t-172406/instantiating-an-excel-object-from-peoplesoft-page#post-718207</link>
				<description></description>
				<pubDate>Mon, 08 Mar 2010 18:41:15 +0000</pubDate>
				<wikidot:authorName>Anisha</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>Hello Susan,</p> <p>Are you still having the same error "Invalid parameter: CreateObject Excel.Application invalid class string for function ObjectGetProperty." ? What have you done to correct this error?<br /> I am actually facing the same error when using the following code in my AE peoplecode:<br /> Local object &amp;oWorkApp,&amp;oWorkBook;<br /> &amp;oWorkApp = CreateObject("COM", "Excel.Application");<br /> &amp;oWorkBook = ObjectGetProperty(&amp;oWorkApp, "Workbooks");</p> <p>Thank you for your help.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://www.peoplesoftwiki.com/forum/t-172406#post-680544</guid>
				<title>Re: Manipulating Excel Object in PeopleCode</title>
				<link>http://www.peoplesoftwiki.com/forum/t-172406/instantiating-an-excel-object-from-peoplesoft-page#post-680544</link>
				<description></description>
				<pubDate>Thu, 21 Jan 2010 15:58:22 +0000</pubDate>
				<wikidot:authorName>Tom</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>Hi - I have sqr process to read the .dat file as input file. But I am getting the file in excel format. I want to convert this XLS file into .dat format. I am unable to do this through the SQR. One of my colleague suggest me go with the Application Engine. Here is the code I am trying to convert the XLS file into .DAT through the App Engine. But I am missing the link between after opening the xls file and writing into .DAT file. Can you help me how to connect between after opening the file and writing the file.</p> <p>&amp;oWorkApp = CreateObject("COM", "Excel.Application");<br /> ObjectSetProperty(&amp;oWorkApp, "Visible", True);<br /> &amp;oWorkBook = ObjectGetProperty(&amp;oWorkApp, "Workbooks");<br /> &amp;oWorkBook.Open("C:\temp\rates99.xls");</p> <p>Local File &amp;DATFILE;<br /> Local string &amp;FILE_NAME, &amp;DATA;</p> <p>&amp;FILE_NAME = "C:\temp\rates.dat";<br /> &amp;DATFILE = GetFile(&amp;FILE_NAME, "r");<br /> &amp;FileName = &amp;DATFILE.Name;<br /> &amp;POS = Find(".", &amp;FileName);<br /> &amp;NEWFILE_NAME = Substring(&amp;FileName, 1, &amp;POS) | "dat";<br /> &amp;DATFILE = GetFile(&amp;NEWFILE_NAME, "N", %FilePath_Absolute);<br /> If &amp;DATFILE.IsOpen Then<br /> While &amp;DATFILE.ReadLine(&amp;DATA);<br /> &amp;DATFILE.WriteLine(&amp;DATA);<br /> End-While;<br /> &amp;DATFILE.Close();<br /> End-If;</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://www.peoplesoftwiki.com/forum/t-172406#post-549771</guid>
				<title>Re: Instantiating an Excel Object from Peoplesoft page</title>
				<link>http://www.peoplesoftwiki.com/forum/t-172406/instantiating-an-excel-object-from-peoplesoft-page#post-549771</link>
				<description></description>
				<pubDate>Fri, 31 Jul 2009 18:33:59 +0000</pubDate>
				<wikidot:authorName>Valkyrie</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>Yes its should be declare as Object when instantiating workbook, worksheet, range or cell objects in Excel heres my declaration and it works fine;</p> <p>Local object &amp;oWorkApp, &amp;oWorkSheet, &amp;oWorkBook, &amp;oRange, &amp;oCells;</p> <p>Valkyrie</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://www.peoplesoftwiki.com/forum/t-172406#post-549768</guid>
				<title>Re: Instantiating an Excel Object from Peoplesoft page</title>
				<link>http://www.peoplesoftwiki.com/forum/t-172406/instantiating-an-excel-object-from-peoplesoft-page#post-549768</link>
				<description></description>
				<pubDate>Fri, 31 Jul 2009 18:29:37 +0000</pubDate>
				<wikidot:authorName>Valkyrie</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>Hi Susan, I use the same code and it works fine. Only thing I notice in your code is that you have space between createObject and the parenthesis</p> <p>Heres our code compare side by side<br /> &amp;WorkApp = CreateObject ("COM", "Excel.Application"); your code<br /> &amp;oWorkApp = CreateObject("COM", "Excel.Application"); my code</p> <p>&amp;oWorkBook = ObjectGetProperty(&amp;oWorkApp, "Workbooks"); my coode<br /> &amp;WorkBook = ObjectGetProperty(&amp;WorkApp, "Workbooks"); your code</p> <p>I hope it helps..</p> <p>Valkyrie</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://www.peoplesoftwiki.com/forum/t-172406#post-549765</guid>
				<title>Manipulating Excel Object in PeopleCode</title>
				<link>http://www.peoplesoftwiki.com/forum/t-172406/instantiating-an-excel-object-from-peoplesoft-page#post-549765</link>
				<description></description>
				<pubDate>Fri, 31 Jul 2009 18:23:13 +0000</pubDate>
				<wikidot:authorName>Valkyrie</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>Hi,</p> <p>I have instantiated Excel Object in AE Peoplecode and have been successfully manipulating data cells in each worksheet tab of my workbook.<br /> Now I want to copy a range of cells from one worksheet to another and paste its values on the other worksheet, though I dont encounter error but the<br /> action does not execute. Also when I try to save the excel file it takes forever to save. Heres some part of my code<br /> Appreciate your input.</p> <p>get <strong>a cell range then;</strong></p> <p>&amp;RangeSelected = &amp;oCells.Copy;<br /> &amp;oWorkSheet1 = &amp;oWorkApp.Worksheets("Sheet2");<br /> &amp;oCell = ObjectGetProperty(&amp;oWorkSheet1, "Range", "A1");<br /> &amp;SheetSelected = &amp;oWorkSheet1.Activate;<br /> &amp;oCell = ObjectGetProperty(&amp;oCell, "PasteSpecial");</p> <p>ObjectDoMethod(&amp;WORKAPP, "Save", "C:\TEMP\TEST1.XLS");</p> <p>Thanks a lot</p> <p>Valkyrie</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://www.peoplesoftwiki.com/forum/t-172406#post-547554</guid>
				<title>Re: Instantiating an Excel Object from Peoplesoft page</title>
				<link>http://www.peoplesoftwiki.com/forum/t-172406/instantiating-an-excel-object-from-peoplesoft-page#post-547554</link>
				<description></description>
				<pubDate>Wed, 29 Jul 2009 11:24:59 +0000</pubDate>
				<wikidot:authorName>Praj</wikidot:authorName>				<wikidot:authorUserId>52320</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Should the variable <tt>&amp;WorkBook</tt> be delcared as an object? If you change the delcaration line to:</p> <div class="code"> <pre> <code>Local object &amp;WorkApp;</code> </pre></div> <p>And remove, <tt>&amp;WorkBook</tt>, does that make any difference?</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://www.peoplesoftwiki.com/forum/t-172406#post-547001</guid>
				<title>Instantiating an Excel Object from Peoplesoft page</title>
				<link>http://www.peoplesoftwiki.com/forum/t-172406/instantiating-an-excel-object-from-peoplesoft-page#post-547001</link>
				<description></description>
				<pubDate>Tue, 28 Jul 2009 23:53:27 +0000</pubDate>
				<wikidot:authorName>Susan</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>Using the example from PeopleBooks returns an error on the ObjectGetProperty statement and I don't know what is wrong with it.<br /> The code used is as follows:</p> <p>Local object &amp;WorkApp, &amp;WorkBook;</p> <p>&amp;WorkApp = CreateObject ("COM", "Excel.Application");<br /> &amp;WorkBook = ObjectGetProperty(&amp;WorkApp, "Workbooks");</p> <p>etc<br /> The message returned for the ObjectGetProperty statement says "Invalid parameter: CreateObject Excel.Application invalid class string for function ObjectGetProperty. The specified parameter is not correct for the function. It may be the wrong type of parameter (string, number, record, field etc) or an invalid value in this context.</p> <p>Can anyone help?</p> 
				 	]]>
				</content:encoded>							</item>
				</channel>
</rss>
