title: win32com.client to format an Excel columns
body: <p>I am writing output data to excel using pandas. I want to format excel using win32com.client as I do not easier method for this.</p>
  
  <p>my code is from some internet search is</p>
  
  <pre><code>    Xlsx = win32.DispatchEx('Excel.Application')
      Xlsx.DisplayAlerts = True
      Xlsx.Visible = True
      book = Xlsx.Workbooks.Open('C:\\temp\\test.xlsx')
      ws = book.Worksheets("Sheet1")
      ws.Columns.NumberFormat = "0,0"
      ws.Columns.AutoFit()
      ws.Range("A1:P1").Interior.ColorIndex = 20
      book.Save()
      book.Close()
      Xlsx.Quit()
      del book
      del Xlsx 
  </code></pre>
  
  <p>Here i do not want all columns of excel in decimal format e.g. I want column b, d, f in integer format and all other columns having number data in decimal format up to 2 decimals and all text in "center" how can I do this ?</p>
  
  <p>Secondly if you know any other module to easily achieve this simple formatting pl suggest.</p>