xlsx icon indicating copy to clipboard operation
xlsx copied to clipboard

A simple question: how to just combine multiple excel files into one?

Open liuyanguu opened this issue 1 year ago • 1 comments

I thought this would be very easy using the "xlsx" package, but it seems to be not the case. The task is simply to combine several .xlsx files (some have 2 sheets, some have 1) into one .xlsx, keeping all the sheets the same. I don't want to read the data and write the data because there are also figures and pictures in those .xlsx files to be combined.

Is this something that can be done using the "xlsx" package? Any hint is highly appreciated. Many thanks again for the great package. Best,

liuyanguu avatar Feb 09 '24 09:02 liuyanguu

Apologies for the late reply here. Unfortunately, I do not think this is as straightforward as would be ideal 😢

We are using Apache POI, which is a low level Java library. Unfortunately, we are still on a very old version... (I never landed the update).

But even with newer versions, it does not look like there is a great way to solve this problem because of how different Workbooks encode a sheet. They added a cloneSheet() method within a workbook, but between workbooks is another story 😞

https://stackoverflow.com/questions/5889639/apache-poi-copying-sheets

colearendt avatar Aug 27 '24 18:08 colearendt

Thank you so much for the detailed information. Good to know the technical challenge behind it.

liuyanguu avatar Dec 28 '24 13:12 liuyanguu