0
Ich habe eine Zeilenliste mit cfspreadsheet in ColdFusion10.cfspreelsheet, das erste Element in der Zeile fett macht
<cfset rowList = "'#(rnA eq 1)?assoc_name:''#','#(rnl eq 1)?trans_location:''#','#checklistsByAssocLoc#','#assocChecklistsByLoc#','#DecimalFormat(totalChecklistsByAssocLocPct)#'">
Ich versuche diesen Teil fett zu machen.
Ich habe versucht, cfif Aussagen und nichts scheint mir das Ergebnis zu geben, muss ich meine Namen fett zu machen.
Jede Hilfe mit diesem würde sehr geschätzt werden.
EDIT
Meine gesamte Tabelle
<cftry>
<cfset objSpreadsheet = SpreadsheetNew()>
<!--- Create and format the header row. --->
<cfset SpreadsheetAddRow(objSpreadsheet, "Associate Name,Location,Checklists Generated by Associate,Checklists Generated by Selected Location(s),Associate Percentage of Location Total")>
<cfset SpreadsheetFormatRow(objSpreadsheet, {bold=true, textwrap="true", alignment="center"}, 1)>
<cfset rowNumber = 0 />
<cfoutput query="GetEmployeeInfo">
<cfset rowNumber++ />
<cfset rowList = "'#(rnA eq 1)?assoc_name:''#','#(rnl eq 1)?trans_location:''#','#checklistsByAssocLoc#','#assocChecklistsByLoc#','#DecimalFormat(totalChecklistsByAssocLocPct)#'">
<cfset SpreadsheetAddRow(objSpreadsheet, rowList)>
<cfset SpreadsheetFormatColumn(objSpreadsheet, {'bold' : 'true'}, 1)>
<!---<cfset spreadsheetFormatCell(objSpreadsheet, {bold: true}, rowNumber, 1)>--->
<cfif rnTotAssoc EQ 1>
<cfset rowNumber++ />
<cfset rowList = "'Associate Total','','#totalChecklistsByAssoc#','#totalAssocChecklistsByAllFilteredLoc#','#DecimalFormat(totalChecklistsByLocPct)#'" >
<cfset SpreadsheetAddRow(objSpreadsheet, rowList)>
</cfif>
</cfoutput>
<cfset SpreadSheetSetColumnWidth(objSpreadsheet,1,25)>
<cfset SpreadSheetSetColumnWidth(objSpreadsheet,2,25)>
<cfset SpreadSheetSetColumnWidth(objSpreadsheet,3,25)>
<cfset SpreadSheetSetColumnWidth(objSpreadsheet,4,25)>
<cfset SpreadSheetSetColumnWidth(objSpreadsheet,5,25)>
<cfheader name="Content-Disposition" value="inline; filename=CS_#Dateformat(NOW(),'MMDDYYYY')#.xls">
<cfcontent type="application/vnd.ms-excel" variable="#SpreadsheetReadBinary(objSpreadsheet)#">
<cfcatch type = "any">
#rowList#
<cfabort>
</cfcatch>
</cftry>
Können Sie mehr von Ihrem Code teilen? – RRK
Lassen Sie uns [diese Diskussion im Chat fortsetzen] (http://chat.stackoverflow.com/rooms/157667/discussion-between-rrk-and-david-brierton). – RRK
Super !! Das hat funktioniert!!! –