excel - Modifying and creating xlsx files with Python, specifically formatting single words of a e.g. sentence in a cell -


i'm working lot excel xlsx files convert using python 3 pandas dataframes, wrangle data using pandas , write modified data xlsx files again.

the files contain text data may formatted. while modifications (which have done) have been pretty straight forward, experience problems when comes partly formatted text within single cell:

example of cell content: "medical device whith remote control , bluetooth module communication"

the formatting in example bold , italic may color.

so, have 2 questions:

  1. is there way of preserving such formatting in xlsx files when importing file python environment?
  2. is there way of creating/modifying such formatting using specific python library?

so far have been using pandas, openpyxl, , xlsxwriter have not succeeded yet. shall appreciate help!

as pointed out below in comment , linked question openpyxl not allow kind of formatting:

any other ideas on how tackle task?

i have been working openpyxl. if 1 cell has same style(font/color), can style cell.font: cell.font.bmeans bold andcell.font.i means italic, cell.font.color contains color object.

but if style different within 1 cell, cannot help. minor indication on cell.value


Comments

Popular posts from this blog

python Tkinter Capturing keyboard events save as one single string -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

javascript - Z-index in d3.js -