--- volatility/plugins/malware/psxview.py.orig	2016-12-27 15:54:47 UTC
+++ volatility/plugins/malware/psxview.py
@@ -35,8 +35,8 @@ import volatility.plugins.addrspaces.sta
 try:
     from openpyxl.workbook import Workbook
     from openpyxl.writer.excel import ExcelWriter
-    from openpyxl.cell import get_column_letter
-    from openpyxl.styles import Color, Fill, Style, PatternFill, Border, Side, Alignment, Protection, Font
+    from openpyxl.utils import get_column_letter
+    from openpyxl.styles import Color, Fill, NamedStyle, PatternFill, Border, Side, Alignment, Protection, Font
     from openpyxl.cell import Cell
     from openpyxl import load_workbook
     has_openpyxl = True 
@@ -233,7 +233,7 @@ class PsXview(common.AbstractWindowsComm
                     yield offset, source[offset], ps_sources
 
     def render_xlsx(self, outfd, data):
-        BoldStyle = Style(font=Font(name='Calibri',
+        BoldStyle = NamedStyle(name='BoldStyle', font=Font(name='Calibri',
                  size=11,
                  bold=True,
                  italic=False,
@@ -244,7 +244,7 @@ class PsXview(common.AbstractWindowsComm
             fill=PatternFill(fill_type="solid",
                  start_color='FF000000',
                  end_color='FF000000'))
-        RedStyle = Style(font=Font(name='Calibri',
+        RedStyle = NamedStyle(name='RedStyle', font=Font(name='Calibri',
                  size=11,
                  bold=False,
                  italic=False,
@@ -272,7 +272,7 @@ class PsXview(common.AbstractWindowsComm
             fill=PatternFill(start_color = 'FFFF0000',
                     end_color = 'FFFF0000',
                     fill_type = 'solid'))
-        GreenStyle = Style(font=Font(name='Calibri',
+        GreenStyle = NamedStyle(name='GreenStyle', font=Font(name='Calibri',
                  size=11,
                  bold=False,
                  italic=False,
@@ -284,7 +284,7 @@ class PsXview(common.AbstractWindowsComm
                     end_color = "FF00FF00",
                     fill_type = "solid"))
 
-        wb = Workbook(optimized_write = True)
+        wb = Workbook(write_only = True)
         ws = wb.create_sheet()
         ws.title = "Psxview Output"
         ws.append(["Offset (P)",
@@ -348,15 +348,15 @@ class PsXview(common.AbstractWindowsComm
         wb.save(filename = self._config.OUTPUT_FILE)
 
         wb = load_workbook(filename = self._config.OUTPUT_FILE)
-        ws = wb.get_sheet_by_name(name = "Psxview Output")
+        ws = wb["Psxview Output"]
         for col in xrange(1, 12):
-            ws.cell("{0}{1}".format(get_column_letter(col), 1)).style = BoldStyle
+            ws["{0}{1}".format(get_column_letter(col), 1)].style = BoldStyle
         for row in xrange(2, total + 1):
             for col in xrange(4, 11):
-                if ws.cell("{0}{1}".format(get_column_letter(col), row)).value == "False":
-                    ws.cell("{0}{1}".format(get_column_letter(col), row)).style = RedStyle
+                if ws["{0}{1}".format(get_column_letter(col), row)].value == "False":
+                    ws["{0}{1}".format(get_column_letter(col), row)].style = RedStyle
                 else:
-                    ws.cell("{0}{1}".format(get_column_letter(col), row)).style = GreenStyle
+                    ws["{0}{1}".format(get_column_letter(col), row)].style = GreenStyle
         wb.save(filename = self._config.OUTPUT_FILE)
 
     def unified_output(self, data):
