├── img └── toolbar.png ├── fonts ├── fontawesome-webfont.eot ├── fontawesome-webfont.ttf ├── fontawesome-webfont.woff └── fontawesome-webfont.woff2 ├── css ├── font-awesome.4.6.0.css ├── excel.css ├── main.css └── font-awesome.min.css ├── js ├── windowFun.js └── excel.js ├── README.md ├── README.en.md ├── index.html └── LICENSE /img/toolbar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MyBeany/myExcel/HEAD/img/toolbar.png -------------------------------------------------------------------------------- /fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MyBeany/myExcel/HEAD/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MyBeany/myExcel/HEAD/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MyBeany/myExcel/HEAD/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MyBeany/myExcel/HEAD/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /css/font-awesome.4.6.0.css: -------------------------------------------------------------------------------- 1 | /*-防止各大cdn公共库加载地址失效问题,此地址我们会时时监控,及调整-www.jq22.com为您服务*/ 2 | /*当前为百度 cdn公共库提供font-awesome-4.6.0 Css样式文件*/ 3 | @import url("font-awesome.min.css"); 4 | -------------------------------------------------------------------------------- /js/windowFun.js: -------------------------------------------------------------------------------- 1 | window.onbeforeunload = function (e) { 2 | e = e || window.event; 3 | if (e) { 4 | e.returnValue = '确定离开吗?'; 5 | } 6 | return '确定离开吗?'; 7 | }; -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # myExcel 2 | 3 | #### 介绍 4 | 基于jquery实现的web版excel。包含excel的基本功能 5 | 1. 支持合并单元格,拆分单元格 6 | 2. 支持插入单元格,删除单元格 7 | 3. 支持整行整列选择单元格 8 | 4. 自定义右键菜单,可以设置单元格数量 9 | 5. 支持鼠标左键拖动调整单元格宽高 10 | 6. 支持选中单元格输入文字,多个单元格设置字体,颜色,单元格背景色,水平位置,垂直位置,字体粗细,斜体,字体大小等样式 11 | 7. 单元格设置自动换行功能,默认为超出部分显示省略号 12 | 8. 支持表结构修改的撤回功能(待完善) 13 | 9. 支持单个单元格的样式复制 14 | 10. 支持选中单元格,鼠标左键选中复制。复制支持有规律的数字计算(等差数列) 15 | 11. 支持设置单元格线条样式,颜色 16 | 12. 选中单元格可以根据上下左右键来进行移动选择,回车键默认与右键功能相同 17 | 13. 支持保存excel的HTML结构和将保存的excel结构代码展示出来继续编辑 18 | 19 | #### 软件架构 20 | 使用jquery制作,其中使用了font-awesome作为字体图标 21 | 22 | 23 | #### 安装教程 24 | 25 | 下载后直接打开index.html运行即可 26 | 27 | #### 界面展示 28 | 29 |  30 |  31 |  32 | -------------------------------------------------------------------------------- /README.en.md: -------------------------------------------------------------------------------- 1 | # myExcel 2 | 3 | #### Description 4 | 基于jquery实现的web版excel。包含excel的基本功能 5 | 6 | #### Software Architecture 7 | Software architecture description 8 | 9 | #### Installation 10 | 11 | 1. xxxx 12 | 2. xxxx 13 | 3. xxxx 14 | 15 | #### Instructions 16 | 17 | 1. xxxx 18 | 2. xxxx 19 | 3. xxxx 20 | 21 | #### Contribution 22 | 23 | 1. Fork the repository 24 | 2. Create Feat_xxx branch 25 | 3. Commit your code 26 | 4. Create Pull Request 27 | 28 | 29 | #### Gitee Feature 30 | 31 | 1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md 32 | 2. Gitee blog [blog.gitee.com](https://blog.gitee.com) 33 | 3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore) 34 | 4. The most valuable open source project [GVP](https://gitee.com/gvp) 35 | 5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help) 36 | 6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) -------------------------------------------------------------------------------- /css/excel.css: -------------------------------------------------------------------------------- 1 | .excel-table { 2 | overflow: auto; 3 | } 4 | 5 | .excel { 6 | margin: 0 auto; 7 | width: 100%; 8 | height: 60%; 9 | position: relative 10 | } 11 | 12 | .excel-table table tr { 13 | /*line-height: 35px*/ 14 | } 15 | 16 | .excel-table table td { 17 | border: #ccc 1px solid; 18 | word-wrap: break-word; 19 | word-break: break-all; 20 | font-size: 12px; 21 | white-space: nowrap; 22 | overflow: hidden; 23 | text-overflow: ellipsis; 24 | width: 60px; 25 | font-family: 微软雅黑; 26 | } 27 | 28 | .excel-table table td:focus { 29 | outline: 0; 30 | border: 1px solid #5897fb; 31 | box-shadow: 0 0 5px rgba(73, 177, 249, .5) 32 | } 33 | 34 | .td-chosen-css { 35 | } 36 | 37 | .td-chosen-muli-css { 38 | background-color: rgba(0, 94, 255, 0.1); 39 | } 40 | 41 | .col-width-panel, .row-height-panel, .chosen-area-p, .rightmouse-panel-div, .chosen-area-p div { 42 | position: absolute 43 | } 44 | 45 | .col-width-panel div { 46 | width: 8px; 47 | position: absolute; 48 | cursor: col-resize; 49 | z-index: 999; 50 | } 51 | 52 | .row-height-panel div { 53 | height: 8px; 54 | position: absolute; 55 | cursor: row-resize; 56 | z-index: 999; 57 | } 58 | 59 | .drug-ele-td { 60 | background-color: #f0f0f0 !important; 61 | cursor: pointer 62 | } 63 | 64 | .rightmouse-panel-div { 65 | background-color: #fff; 66 | border: 1px solid #bbd8e5; 67 | border-radius: 4px; 68 | z-index: 9; 69 | -moz-user-select: none; /*火狐*/ 70 | -webkit-user-select: none; /*webkit浏览器*/ 71 | -ms-user-select: none; /*IE10*/ 72 | -khtml-user-select: none; /*早期浏览器*/ 73 | user-select: none; 74 | position: fixed; 75 | } 76 | 77 | .rightmouse-panel-div .wb { 78 | line-height: 24px; 79 | letter-spacing: 1px; 80 | font-size: 13px; 81 | padding-left: 7px; 82 | cursor: pointer; 83 | } 84 | 85 | .rightmouse-panel-div .wb:hover { 86 | background-color: #f0f8ff 87 | } 88 | 89 | .panel-div-left, .panel-div-right { 90 | float: left 91 | } 92 | 93 | .panel-div-left { 94 | border-right: 1px solid #bbd8e5 95 | } 96 | 97 | .excel-rightmomuse-icon-css { 98 | display: inline-block; 99 | width: 20px 100 | } 101 | 102 | .excel-rightmomuse-icon-next-css { 103 | margin-left: 33px; 104 | font-size: 18px; 105 | color: #795548 106 | } 107 | 108 | .setting .setting-text { 109 | color: #e91e63 110 | } 111 | 112 | .setting .setting-input { 113 | margin-left: 4px 114 | } 115 | 116 | .setting .setting-item { 117 | margin-right: 7px 118 | } 119 | 120 | .setting input { 121 | width: 35px 122 | } 123 | 124 | .chosen-area-p { 125 | background-color: #5292F7 126 | } 127 | 128 | .chosen-area-p-drug { 129 | cursor: crosshair 130 | } 131 | 132 | table { 133 | border-collapse: collapse; 134 | border-spacing: 0; 135 | margin: 0; 136 | border-width: 0; 137 | table-layout: fixed; 138 | width: 0; 139 | outline-width: 0; 140 | cursor: default; 141 | max-width: none; 142 | max-height: none; 143 | -webkit-user-select: none; 144 | -moz-user-select: none; 145 | -ms-user-select: none; 146 | user-select: none; 147 | } 148 | 149 | .buttonBgColor { 150 | background-color: #ddd !important; 151 | } 152 | 153 | .hr { 154 | width: 100%; 155 | height: 1px; 156 | border-bottom: 1px solid #ccc; 157 | } 158 | 159 | .selectTd { 160 | background-color: #fff; 161 | /*border: 1px solid #5292F7!important;*/ 162 | } 163 | 164 | .whiteSpaceTrue { 165 | white-space: normal !important; 166 | } 167 | 168 | .selectBorderStyle { 169 | position: absolute; 170 | top: 30px; 171 | background-color: #fff; 172 | display: none; 173 | z-index: 999; 174 | width: 100px; 175 | border: 1px solid #ccc; 176 | left: -40px; 177 | -webkit-user-select:none; 178 | -moz-user-select:none; 179 | -ms-user-select:none; 180 | user-select:none; 181 | border-radius: 3px; 182 | border-bottom: 0px; 183 | } 184 | 185 | .show { 186 | display: block; 187 | } 188 | .borderStyleOption{ 189 | padding: 5px 20px; 190 | border-bottom: 1px solid #ccc; 191 | cursor: pointer; 192 | } 193 | 194 | .thead :nth-child(1) { 195 | background-color:#fff !important; 196 | } 197 | .tableLeftTop{ 198 | position: fixed; 199 | top: 128px; 200 | width: 62px; 201 | height: 25px; 202 | z-index: 999; 203 | background: #fff; 204 | text-align: center; 205 | line-height: 25px; 206 | border-bottom: 1px solid #ccc; 207 | border-right: 1px solid #ccc; 208 | border-top: 1px solid #ccc; 209 | } 210 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 |