pythonexcelwinapipywin32python-in-excel

Format a column of data in excel into percentage using win32 python


Trying to convert a column of data into percentage using win32 python in excel

xlSheet.Range("C3:C7").Style = "Percentage"

This does not work. Is there any other way?


Solution

  • You almost had it.

    The correct formatting name is "Percent".

    So try:

    xlSheet.Range("C3:C7").Style = "Percent"