![]() |
#2 |
Участник
|
может, так:
#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); } } |
|
Теги |
spreadsheet |
|
|