Question: I need to open an existing \*.xlsx Excel file, make some modifications, and then save it as a new file (or stream it to the frontend without saving). The original file must remain unchanged.

For Memory reasons, I avoid using FileInputStream (as described here: <http://poi.apache.org/spreadsheet/quick-guide.html#FileInputStream> )

```
// XSSFWorkbook, File
OPCPackage pkg = OPCPackage.open(new File("file.xlsx"));
XSSFWorkbook wb = new XSSFWorkbook(pkg);
....
pkg.close();

```

Answer: 
X and y labels are bound to an axes in matplotlib. So it makes little sense to use `xlabel` or `ylabel` commands for the purpose of labeling several subplots. 

What is possible though, is to create a simple text and place it at the desired position. `fig.text(x,y, text)` places some text at coordinates `x` and `y` in figure coordinates, i.e. the lower left corner of the figure has coordinates `(0,0)` the upper right one `(1,1)`.

```
import pandas as pd
import matplotlib.pyplot as plt

df = pd.DataFrame({'A': [0.3, 0.2, 0.5, 0.2], 'B': [0.1, 0.0, 0.3, 0.1], 'C': [0.2, 0.5, 0.0, 0.7], 'D': [0.6, 0.3, 0.4, 0.6]}, index=list('abcd'))
axes = df.plot(kind="bar", subplots=True, layout=(2,2), sharey=True, sharex=True)

fig=axes[0,0].figure
fig.text(0.5,0.04, "Some very long and even longer xlabel", ha="center", va="center")
fig.text(0.05,0.5, "Some quite extensive ylabel", ha="center", va="center", rotation=90)

plt.show()

```

[![enter image description here](https://i.stack.imgur.com/8A97k.png)](https://i.stack.imgur.com/8A97k.png)

The drawback of this solution is that the coordinates of where to place the text need to be set manually and may depend on the figure size.
This will create an invisible 111 axis where you can set the general x and y labels:

```
import pandas as pd
import matplotlib.pyplot as plt

df = pd.DataFrame({'A': [0.3, 0.2, 0.5, 0.2], 'B': [0.1, 0.0, 0.3, 0.1],
                   'C': [0.2, 0.5, 0.0, 0.7], 'D': [0.6, 0.3, 0.4, 0.6]},
                  index=list('abcd'))
ax = df.plot(kind="bar", subplots=True, layout=(2, 2), sharey=True,
             sharex=True, rot=0, fontsize=12)

fig = ax[0][0].get_figure()  # getting the figure
ax0 = fig.add_subplot(111, frame_on=False)   # creating a single axes
ax0.set_xticks([])
ax0.set_yticks([])
ax0.set_xlabel('my_general_xlabel', labelpad=25)
ax0.set_ylabel('my_general_ylabel', labelpad=45)

# Part of a follow up question: Modifying the fontsize of the titles:
for i,axi in np.ndenumerate(ax):
    axi.set_title(axi.get_title(),{'size' : 16})

```

[![enter image description here](https://i.stack.imgur.com/HmxUV.png)](https://i.stack.imgur.com/HmxUV.png)