文件发不上去,大概代码在下面:
- <!doctype html>
- <html style="height:100%;font-size:14px;" lang="en">
- <head>
- <link rel="stylesheet" type="text/css" >
- <script src="http://cdn.grapecity.com/spreadjs/hosted/scripts/gc.spread.sheets.all.13.1.1.min.js" type="text/javascript"></script>
- <script src="http://cdn.grapecity.com/spreadjs/hosted/scripts/resources/ja/gc.spread.sheets.resources.ja.13.1.1.min.js" type="text/javascript"></script>
- <meta charset="UTF-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
- </head>
- <body>
- <div id="ss" style="width:100%; height:360px;border: 1px solid gray;"></div>
- <script type="text/javascript">
- window.onload = function(){
- GC.Spread.Common.CultureManager.culture("ja-jp");
- var spread = new GC.Spread.Sheets.Workbook(document.getElementById("ss"));
- var sheet = spread.getActiveSheet();
- setLineBorder(sheet, 20, 20);
-
- //sheet.getRange(1, 1, 3, 2).setBorder(new GC.Spread.Sheets.LineBorder("#8A2BE2", GC.Spread.Sheets.LineStyle.thin), {all:true});
- var lineGray_W = new GC.Spread.Sheets.LineBorder('white', GC.Spread.Sheets.LineStyle.thin);
- sheet.getRange(1, 1, 1, 2, GC.Spread.Sheets.SheetArea.viewport).setBorder(lineGray_W, {inside:true});
- sheet.getRange(2, 1, 1, 2, GC.Spread.Sheets.SheetArea.viewport).setBorder(lineGray_W, {inside:true});
- sheet.getRange(3, 1, 1, 2, GC.Spread.Sheets.SheetArea.viewport).setBorder(lineGray_W, {inside:true});
- //sheet.options.gridline.showHorizontalGridline = false;
- //sheet.options.gridline.showVerticalGridline = false;
-
- function setLineBorder(sheet, rowCnt, colCnt) {
- var lineGray = new GC.Spread.Sheets.LineBorder('#000000', GC.Spread.Sheets.LineStyle.thin);
- sheet.getRange(0, 0, rowCnt, colCnt).setBorder(lineGray, {all:true});
- }
- }
- </script>
- </body>
- </html>
复制代码 |