首页 文章

使用xlwt python合并两个以上的单元格

提问于
浏览
0

我试图在excel文件的行中合并4列 . 此链接有关于如何为两行执行此操作的一些建议:How to write a cell with multiple columns in xlwt?用于合并两列和两行的行:

sheet.write_merge(0, 0, 0, 1, 'Long Cell')

但是,当我尝试仅合并4行时,相同的代码语法不起作用 . 我的代码:

sh.write_merge(0,4,0,5,0,6,0,7,'Start point\nCo-ordinates')

我基本上需要像this.这样的东西

1 回答

  • 0

    也许这个?

    sh.write_merge(0, 0, 4, 7, 'Start point\nCo-ordinates')
    

相关问题