Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Newbie asks: Where is Method Library?

Status
Not open for further replies.

pixiesfb

Programmer
Apr 27, 2001
62
US
Total newbie grovels for help...

(I'm a Cold Fusion programmer using a custom tag to do this, I have no experience w/ COM objects)

I'm looking for a Method Library for Excel, I've scoured the Microsoft site and can't find what I want, (or don't know what I'm looking for). I'm trying to modify this code to Set the pagesetup to print on a single page

A co-worker tried to implement this but did not work: objWorkSheet.PageSetup.FitToPagesTall = 1;
objWorkSheet.PageSetup.FitToPagesWide = 1;:

Here is the full code:


// open Excel in the background
objExcel.Visible = false;

// disable Alerts such as: 'Save this workbook?'
objExcel.DisplayAlerts =false;

// Define the workbooks object
objWorkBook = objExcel.Workbooks;

// open the Excel file */
objOpenedBook = objWorkBook.Open(HTMLFilePath);

// get the WorkSheets collection
objWorkSheets = objExcel.WorkSheets;

// get the active worksheet - will have the same name as the HTML file
objWorkSheet = objWorkSheets.Item(HTMLFileName);

objWorkSheet.Name = Attributes.SheetName;

// Save As does not work with workbooks / only with worksheets
objWorkSheet.SaveAs(ExcelFilePath,Val(1));

// Close the document
objWorkBook.Close();

if(Attributes.LeaveOpen IS "No"){
// Quit Excel
objExcel.Quit();
}

//release the object
objExcel = "Nothing";


 
Check the Excel helpfile under Programming Information.
You may have to do a custom install to get this section of the help, I don't remember......
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top