Status/Resolution/Reason: Closed/Fixed/Fixed
Reporter/Name(from Bugbase): tair paz / tair paz ()
Created: 04/05/2017
Components: Document Management, Office Integration
Versions: 2016,11.0,2018
Failure Type: Non Functioning
Found In Build/Fixed In Build: 2016.0.03.300466 / 2018.0.0.311568
Priority/Frequency: Normal / All users will encounter
Locale/System: English / Windows 7 64-bit
Vote Count: 0
Problem Description: Cfspreadsheet formatting functions do not work correctly in cf16 version. For example when you apply the styles to the rows and columns within the same rows the styles for the rows break. Image is attached. Also when variables indicating the row numbers are used in the scripts the formatting breaks as well (check the does not work comments sections in the code). The same functions worked properly in CF10. The issues occurred when the application got upgraded to cf16. The images of the outcomes for cf10 and cf16 are attached.
Steps to Reproduce:<cfscript>
s = SpreadsheetNew("mysheet","yes");
rownum = 1;
SpreadsheetAddRow(s, "My title", rownum, 7);
SpreadsheetFormatRow(s,{bold=true,fgcolor="white",color="blue"},1);
//does not work
//SpreadsheetFormatRow(s,{bold=true,fgcolor="white",color="blue"},rownum);
SpreadsheetAddRow(s, ",533 data,533 + Weekly,Other Misc Costs,Cost Adjustment,ITD Cost (No In House Tax), In House Tax,Accrued Hrs,Prev Assessed Amt (No In House Tax),Prev Assessed Hrs");
SpreadsheetFormatRow(s,{bold=true,textwrap="true",fgcolor="white",alignment="center",fontsize=12},2);
//does not work
//SpreadsheetFormatRow(s,{bold=true,textwrap="true",fgcolor="white",alignment="center",fontsize=12},rownum);
rownum++;
formatDollar= StructNew();
formatDecimal= StructNew();
formatDollar.dataformat="$##,##0.00";
formatDecimal.dataformat="##,##0.00";
//formatDollar.dataformat= "$##,##0.00_);[Red]($##,##0.00)";
//SpreadsheetFormatColumn(s,formatDollar,3);
//SpreadsheetFormatColumns(s,formatDecimal,"8,10,12");
SpreadsheetAddRow(s,",200,300,400,500,600,700,800,900,1000");
rownum++;
SpreadsheetAddRow(s,"My Total,200,300,400,500,600,700,800,900,1000");
rownum++;
SpreadsheetFormatRow(s,{bold=true,fgcolor="red",color="white"},4);
//does not work
//SpreadsheetFormatRow(s,{bold=true,fgcolor="red",color="white"},rownum);
SpreadsheetFormatCellRange(s,formatDollar, 3,3,4,7);
for ( i=1; i LE 10; i = i+1) {
SpreadSheetSetColumnWidth(s,i,20);
}
</cfscript>
<cfheader name="content-disposition" value="attachment; filename=TotalsRpt.xlsx">
<cfcontent type="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" variable="#spreadsheetReadBinary(s)#">
Actual Result:
Image is attached
Expected Result:
Image is attached
Any Workarounds:
Not to use cfspreadsheet functions
Attachments:
- April 05, 2017 00:00:00: AssmtGrandTotalRpt(28).xlsx
- April 05, 2017 00:00:00: TotalsRpt.xlsx
Comments: