找回密码
 立即注册

QQ登录

只需一步,快速开始

谢朵
注册会员   /  发表于:2023-5-19 17:33:26
21#
JoestarXu 发表于 2023-5-19 16:12
不客气哈,后续有问题随时开贴提问。

你好,刚才那段代码我试过以后发现一个问题。那就是插入的位置不对。我理想是的:不论有多少张,他们会平分合并后的单元格宽度。上面的解决方案如果是三张的情况就不对了

按照现在的代码,如果我有三张图片的话,就跟我想实现的有点差距了

按照现在的代码,如果我有三张图片的话,就跟我想实现的有点差距了

理想的是不论有几张图片,都要评分这个合并后的单元

理想的是不论有几张图片,都要评分这个合并后的单元

demo-sjs-15.rar

5.33 KB, 下载次数: 292

回复 使用道具 举报
JoestarXu
超级版主   /  发表于:2023-5-22 10:24:33
22#
您好,如果想要实现这样的需求,就需要使用第二种方法了,请参考以下代码:

  1.         $(document).ready(function () {
  2.             var spread = new GC.Spread.Sheets.Workbook(document.getElementById("ss"), { sheetCount: 3 });
  3.             var sheet = spread.getActiveSheet();
  4.             sheet.addSpan(16, 5, 1, 2);
  5.             var arr = [
  6.                 "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALgAAAA9CAYAAAAeTqOsAAAAAXNSR0IArs4c6QAADppJREFUeF7tnQm0TWUbxx+ZImPmeSzjQplCZIhoUWYSCk1EqGQmM5kqZJawzLPIMjWYF1moUCkZi0JmGb/1e761v+9+97vu2eecfc7e233ftVr3uuecfd79PP/3ef/P/3neXaK7d+/eFTOMBXxugR9//FF69OghX331lYwbN05atmypd5TIANznnk2g0ycunz9/XtatWyeLFi2Sr7/+Wv7++2957LHHpFWrVvLmm29K4sSJDcATKD58fdvXr19XUPfr109+++03vZdHHnlEI3e1atUkWbJk/7k/E8F97eqENflDhw7JlClTZOPGjfLdd99JpkyZpH79+tK4cWMpW7aspE2bVhIlSvQ/RjEAT1gY8d3d3rp1S86cOSODBw+WiRMnKoDTp0+vHLtXr16SJUuWeO/JANx3Lk8YEwbYO3fulE8//VSWLl2qfLtAgQLSsWNHqVWrlhQpUuT/onVcljEAT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bQEDcF+7z0w+kAUMwANZyLzuawsYgPvafWbygSxgAB7IQuZ1X1vAANzX7jOTD2QBA/BAFjKv+9oCBuC+dp+ZfCALGIAHspB53dcWMAD3tfvM5ANZ4F+W2jTCzSfRKwAAAABJRU5ErkJggg==", "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALgAAAA9CAYAAAAeTqOsAAAAAXNSR0IArs4c6QAADppJREFUeF7tnQm0TWUbxx+ZImPmeSzjQplCZIhoUWYSCk1EqGQmM5kqZJawzLPIMjWYF1moUCkZi0JmGb/1e761v+9+97vu2eecfc7e233ftVr3uuecfd79PP/3ef/P/3neXaK7d+/eFTOMBXxugR9//FF69OghX331lYwbN05atmypd5TIANznnk2g0ycunz9/XtatWyeLFi2Sr7/+Wv7++2957LHHpFWrVvLmm29K4sSJDcATKD58fdvXr19XUPfr109+++03vZdHHnlEI3e1atUkWbJk/7k/E8F97eqENflDhw7JlClTZOPGjfLdd99JpkyZpH79+tK4cWMpW7aspE2bVhIlSvQ/RjEAT1gY8d3d3rp1S86cOSODBw+WiRMnKoDTp0+vHLtXr16SJUuWeO/JANx3Lk8YEwbYO3fulE8//VSWLl2qfLtAgQLSsWNHqVWrlhQpUuT/onVcljEATxh48cVdkjjeuHFDfv75Z+nbt6+sWbNG+FuuXLnk3Xfflddff10eeOCBoO7FADwoc5k3R8oCN2/elG3btsmkSZNUEYGWVKhQQV555RWpV6+e0pLY/NrOXAzA7VjJvCdiFiBiHzx4UKZNm6YcO2nSpFK4cGGN4M8++6w8+OCDYX237wF+9epV+fPPPwXOljVrVkmZMmVIKz0sK5oPh2SBkydPSqdOnTRy//XXX1KuXDnVr6tXr66+DCVix56ILwEOL7ty5YqsWrVKRo8eLd9++63eV+nSpWXChAkqGQXL1ULykPlQ0Ba4c+eOatezZs2SgQMHqp8KFSokbdu21QQyefLkQV8zvg/4DuCAm9U+atQo5Wtwt5o1a8off/whu3btkuHDh2tUSJEihaOGMhcL3wKXLl2SoUOHysKFC+XIkSPy0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JH6lX5HChJPXdR3gSIwkkLSr8pM2UU68ENXpy/Zz9HbSUeZaoVnAdYDDP5HCeOoTMiP9ykiGRHPADTXipwF6aA5O6J9yHeAAmONTJJtwfMr8lO/h+JTpaWOlDYD2TwPyhA7X4O/fdYAzZTgqhw7QfAE1UR0wc9qFwghau3n2d/DONZ8Q8QTAcQSlfyI4PRscQCC5RFrj8WaA3PQ8G7iGYgHPADyUyZvPGAsEsoABeCALmdd9bQEDcF+7z0w+kAUMwANZyLzuawsYgPvafWbygSxgAB7IQuZ1X1vAANzX7jOTD2QBA/BAFjKv+9oCBuC+dp+ZfCALGIAHspB53dcWMAD3tfvM5ANZ4F+W2jTCzSfRKwAAAABJRU5ErkJggg=="
  7.             ]

  8.             let { x, y, width, height } = sheet.getCellRect(16, 5);
  9.             console.log(width, height);

  10.             for (let i = 0; i < arr.length; i++) {
  11.                 console.log(i);
  12.                 var picture = sheet.pictures.add("f" + i, arr[i], 0, 0, 10, 10);
  13.                 var point = new GC.Spread.Sheets.Point(310 + width / 3 * i, 320);
  14.                 picture.position(point);
  15.                 picture.width(width / arr.length);
  16.                 picture.height(height);
  17.             }

  18.             var pic = sheet.pictures.all();
  19.             for (let j = 0; j < pic.length; j++) {
  20.                 console.log("==========================================");
  21.                 console.log("startRowOffset:" + j + "===>" + pic[j].startRowOffset());
  22.                 console.log("startColumnOffset:" + j + "===>" + pic[j].startColumnOffset());
  23.                 console.log("startRow:" + j + "===>" + pic[j].startRow());
  24.                 console.log("startColumn:" + j + "===>" + pic[j].startColumn());
  25.                 console.log("width:" + j + "===>" + pic[j].width());
  26.             }
  27.         })
复制代码


image.png702468261.png

回复 使用道具 举报
谢朵
注册会员   /  发表于:2023-5-22 10:40:53
23#
JoestarXu 发表于 2023-5-22 10:24
您好,如果想要实现这样的需求,就需要使用第二种方法了,请参考以下代码:

好的,我去我的项目中试一下,谢谢
回复 使用道具 举报
JoestarXu
超级版主   /  发表于:2023-5-22 10:56:12
24#
谢朵 发表于 2023-5-22 10:40
好的,我去我的项目中试一下,谢谢

不客气哈,后续如果还有问题随时发帖提问。
回复 使用道具 举报
123
您需要登录后才可以回帖 登录 | 立即注册
返回顶部