Title:
Bug 79294:I’m attempting to make a spreadsheet with 2 merged areas, and the spreadsheetMergeCells() appears to be giving me problems
| View in TrackerStatus/Resolution/Reason: Closed/Fixed/
Reporter/Name(from Bugbase): Rob Kolosky / Rob Kolosky (rkolosky)
Created: 08/05/2009
Components: Document Management, Office Integration
Versions: 9.0
Failure Type: Unspecified
Found In Build/Fixed In Build: 241018 / 245693
Priority/Frequency: Normal / Unknown
Locale/System: English / Win All
Vote Count: 0
Problem:
I’m attempting to make a spreadsheet with 2 merged areas, and the spreadsheetMergeCells() appears to be giving me problems.From the docs:SpreadsheetMergeCells(spreadsheetObj, startRow, startColumn, endRow, endColumn)I can create a merged area on row 1, from columns 1 to 14 with:<cfset spreadsheetMergeCells(sheet,1,1,1,14) />But, if I want to create a merged area on row 3, from columns 1 to 14, I try:<cfset spreadsheetMergeCells(sheet,3,1,3,14) />And CF complains:The ’to’ row (0) must not be less than the ’from’ row (2)Thinking that maybe CFb has it right in it’s dictionary (which says it wants spreadsheet, startrow, endrow, startColumn, endColumn instead of startRow,startColumn, endRow, endColumn that the docs says it wants)<cfset spreadsheetMergeCells(sheet,3,3,1,14) />That complains with:The ’to’ value (1) must not be less than the ’from’ value (3).If I change it to <cfset spreadsheetMergeCells(sheet,3,3,3,14) />It completes, but has a merged area from column 3 to 14, not from column 1 to 14, which was what I wanted.
Method:
<cfset titleStyle = {fontSize="20",bold="true",alignment="center"} /><cfset sheet = spreadsheetNew("Sheet 1") /><!--- Works correctly ---><cfset spreadsheetMergeCells(sheet,1,1,1,14) /><cfset spreadsheetSetCellValue(sheet,"Value1",1,1) /><cfset spreadsheetFormatCell(sheet,titleStyle,1,1) /><!--- From the docs, make a merged section at row 3, from columns 1 to 14 ---><cfset spreadsheetMergeCells(sheet,3,1,3,14) /><cfset spreadsheetSetCellValue(sheet,"Value2",3,1) /><cfset spreadsheetFormatCell(sheet,titleStyle,3,1) /><!--- CFb says to try startRow, endRow, startColumn, endColumn instead ---><cfset spreadsheetMergeCells(sheet,3,3,1,14) /><cfset spreadsheetSetCellValue(sheet,"Value2",3,1) /><cfset spreadsheetFormatCell(sheet,titleStyle,3,1) /><!--- The following works, but gives a merged area from column 3 to 14, not 1 to 14 ---><cfset spreadsheetMergeCells(sheet,3,3,3,14) /><cfset spreadsheetSetCellValue(sheet,"Value2",3,1) /><cfset spreadsheetFormatCell(sheet,titleStyle,3,1) />
Result:
The ’to’ row (0) must not be less than the ’from’ row (2)
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3039571
External Customer Info:
External Company:
External Customer Name: Rob Kolosky
External Customer Email: 0D63608F448DC27599201549
External Test Config: 08/05/2009
Attachments:
Comments: