Показать сообщение отдельно
Старый 18.12.2006, 17:45   #2  
somebody is offline
somebody
Участник
 
128 / 30 (2) +++
Регистрация: 30.04.2003
Адрес: Москва
может, так:

#define.xlOrientationPortrait(1)
#define.xlOrientationLandscape(2)

// _workSheetID -> Page identifier (number or name).
private COM getWorkSheet(anyType _workSheetID)
{
COM workSheets,
comRet;
;

if (m_comDocument)
{
try
{
workSheets = m_comDocument.worksheets();
comRet = workSheets.item(_workSheetID);
}
catch (Exception::Error)
{
throw error('Impossible to create book "MS Excel".');
}
}

return comRet;

}

void setPrintParameters(int _sheetNumber = 1, int _orientation = #xlOrientationLandscape, str _range = '')
{
COM comWorkSheet, comPageSetup;
;

if (m_comDocument)
{
comWorkSheet = this.getWorkSheet(_sheetNumber);
comPageSetup = comWorkSheet.pageSetup();
comPageSetup.orientation(_orientation);
comPageSetup.printTitleColumns(_range);
}
}