Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workbook with CellRichText exception #51

Open
alxpolyakov opened this issue Apr 2, 2024 · 0 comments
Open

Workbook with CellRichText exception #51

alxpolyakov opened this issue Apr 2, 2024 · 0 comments

Comments

@alxpolyakov
Copy link

With code
`blk = TextBlock
font_bold = InlineFont(b=True)
font_normal = InlineFont(b=False)
wb = Workbook()
ws = wb.active
for r in data['requests']:
rich_string = CellRichText(
blk(font_normal, text='Заявка №'),
blk(font_bold, text=str(r['id'])),
blk(font_normal, text=' Мастерская'),
blk(font_bold, text=str(r['shop']['sort'])),
blk(font_normal, r['shop']['name'])
)
ws['A%s' % (n,)] = rich_string
n += 3

wb.save(tmp_file.name)
`
I get an exception AttributeError 'TextBlock' object has no attribute 'name'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant