Sets number of active sheet in given spreadsheet

spreadsheetSetActiveSheetNumber(spreadsheetObj [, number]) → returns void

Argument Reference for the spreadsheetSetActiveSheetNumber function


Required: Yes
No Help Available


Required: No
No Help Available

Examples sample code invoking the spreadsheetSetActiveSheetNumber function

Tag Example

<cfset q = queryNew("Name,Beers,Vegetables,Fruits,Meats", "cf_sql_varchar,cf_sql_integer,cf_sql_integer,cf_sql_integer,cf_sql_integer")> 
  <cfset queryAddRow(q)> 
  <cfset querySetCell(q, "Name", "John")> 
  <cfset querySetCell(q, "Beers", "1")> 
  <cfset querySetCell(q, "Vegetables", "1")> 
  <cfset querySetCell(q, "Fruits", "1")> 
  <cfset querySetCell(q, "Meats", "1")> 
  <cfset mySheet =   SpreadsheetNew( "Test"  ) /> 
  <!--- Make a spreadsheet object ---> 
  <cfset s = spreadsheetNew()> 
  <!--- Add header row ---> 
  <cfset spreadsheetAddRow(s, "Name,Beers,Vegetables,Fruits,Meats")> 
  <!--- Add query ---> 
 SpreadsheetCreateSheet (s, "TestSheet");  
    SpreadsheetSetActiveSheetNumber(s, 2); 
 <cfdump var="#s#" /> 
 <cfheader name="Content-Disposition" value="inline; filename=testFile.xls">  <cfcontent type="application/vnd.msexcel" variable="#SpreadSheetReadBinary(s)#">

Fork me on GitHub