SpreadJS 13
GC.Spread.Sheets Namespace / Workbook type / print Method
The sheet index. If the sheet index is ignored, prints all visible sheets.
In This Topic
    print Method
    In This Topic
    Prints the specified sheet.
    Syntax
    var instance = new GC.Spread.Sheets.Workbook(host,
                                                options,
                                                options.sheetCount,
                                                options.font,
                                                options.allowUserDragMerge,
                                                options.allowUserDragDrop,
                                                options.allowUserDragFill,
                                                options.allowUserZoom,
                                                options.allowUserResize,
                                                options.allowUndo,
                                                options.allowSheetReorder,
                                                options.allowContextMenu,
                                                options.allowUserDeselect,
                                                options.defaultDragFillType,
                                                options.showDragFillSmartTag,
                                                options.showHorizontalScrollbar,
                                                options.showVerticalScrollbar,
                                                options.scrollbarShowMax,
                                                options.scrollbarMaxAlign,
                                                options.tabStripVisible,
                                                options.tabStripRatio,
                                                options.tabEditable,
                                                options.newTabVisible,
                                                options.tabNavigationVisible,
                                                options.cutCopyIndicatorVisible,
                                                options.cutCopyIndicatorBorderColor,
                                                options.backColor,
                                                options.backgroundImage,
                                                options.backgroundImageLayout,
                                                options.grayAreaBackColor,
                                                options.showResizeTip,
                                                options.showDragDropTip,
                                                options.showDragFillTip,
                                                options.showScrollTip,
                                                options.scrollIgnoreHidden,
                                                options.highlightInvalidData,
                                                options.useTouchLayout,
                                                options.hideSelection,
                                                options.resizeZeroIndicator,
                                                options.allowUserEditFormula,
                                                options.enableFormulaTextbox,
                                                options.autoFitType,
                                                options.referenceStyle,
                                                options.calcOnDemand,
                                                options.allowCopyPasteExcelStyle,
                                                options.allowExtendPasteRange,
                                                options.copyPasteHeaderOptions,
                                                options.scrollByPixel,
                                                options.scrollPixel,
                                                options.allowAutoCreateHyperlink,
                                                options.columnResizeMode,
                                                options.rowResizeMode,
                                                options.customList,
                                                options.scrollbarAppearance);
    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 GC.Spread.Sheets.Workbook(document.getElementById("ss"),{sheetCount:3});
    var activeSheet = spread.getActiveSheet(); 
    activeSheet.suspendPaint();
                //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.resumePaint();
    
    //Add button for printing
    $("#button1").click(function () {
    spread.print(0);
       });
    See Also

    Reference

    Workbook type