0
0

LibreOfficeCalc: Python マクロ: セルのコピー

Posted at

プログラム

.config/libreoffice/4/user/Scripts/python/cell_copy.py
import uno

def cell_copy():
	doc = XSCRIPTCONTEXT.getDocument()
	sheet = doc.Sheets[0]
#
	for it in range(8,17):
		cell_src = sheet['B%d' % it]
		cell_target = sheet['K%d' % it]
		vv = cell_src.getString()
		cell_target.setString(vv)
#
		cell_src = sheet['C%d' % it]
		cell_target = sheet['L%d' % it]
		vv = cell_src.getString()
		cell_target.setString(vv)
#
	return

参考ページ

LibreOffice: Python のマクロを使う
LibreOfficeCalc: Python のマクロを作成、実行

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0