SpreadJS Documentation
print Method
The sheet index. If the sheet index is ignored, prints all visible sheets.
Prints the specified sheet.
Syntax
var instance = new GcSpread.Sheets.Spread(host, options);
var value; // Type: any
value = instance.print(sheetIndex);
function print( 
   sheetIndex : number
) : any;

Parameters

sheetIndex
The sheet index. If the sheet index is ignored, prints all visible sheets.
Example
This example prints the sheet using the browser.
var spread = new GcSpread.Sheets.Spread($("#spreadContainer")[0],{sheetCount:3});
// Get active sheet in spread instance
 var activeSheet = spread.getActiveSheet();
activeSheet.isPaintSuspended(true);
            //set value
            for (var r = 0, rc = activeSheet.getRowCount() - 5; r < rc; r++) {
                for (var c = 0, cc = activeSheet.getColumnCount() - 5; c < cc; c++) {
                    activeSheet.setValue(r, c, r + c);
                }
            }
activeSheet.isPaintSuspended(false);

//Add button for printing
$("#button1").click(function () {
spread.print(0);
   });
See Also

Reference

Spread type

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.