0

I've been pouring over the web these last couple days to try to find a text wrapping method using win32com.client with python 2.7.2 (text wrapping as in wrapping the text in a single cell like you would to when you right click and do it in the Format Cells dialogue box).

Something like:

sheet.Cell(1,1).Font.WrapText = True

I've found a thread doing some finda nd replace stuff that includes wrapping I think here but I believe this is for word wrapping in MS Word.

I tried the methiod used here as well, but I'm getting an error indicating WrapText does not exist. I've just doing a quick report and exporting the results to an excel spreadsheet and the word wrapping would bea nice feature to have!

1 Answer 1

1

As per http://msdn.microsoft.com/en-us/library/microsoft.office.interop.excel.range.wraptext.aspx you would use

sheet.Cell(1,1).WrapText = True
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.