SpreadJS製品ヘルプ
print メソッド
GC.Spread.Sheets 名前空間 > Workbook タイプ : print メソッド
シートインデックス。シートインデックスが無視された場合は、表示可能に設定されたすべてのシートが印刷されます。
指定したシートを印刷します。
シンタックス
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.enableAccessibility,
                                            options.allowAutoCreateHyperlink,
                                            options.columnResizeMode,
                                            options.rowResizeMode,
                                            options.customList,
                                            options.scrollbarAppearance,
                                            options.pasteSkipInvisibleRange);
var value; // Type: any
value = instance.print(sheetIndex);
function print( 
   sheetIndex : number
) : any;

パラメータ

sheetIndex
シートインデックス。シートインデックスが無視された場合は、表示可能に設定されたすべてのシートが印刷されます。
使用例
次のサンプルコードは、ブラウザーを使用してシートを印刷します。
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);
   });
関連トピック

参照

Workbook タイプ