问题
I have an excel file which have 2 columns. I want to add a new column in between existing first and second using java program. I am trying to use Apache POI for this purpose. I went through the api docs and some of the related stack over flow questions but I could find examples which only delete/update the cells(not inserting an entire column).
Can any one share useful pointer to this? The only solution which I can think as if now is create a new sheet with 3 columns copy 1st column and 3rd column value from old
回答1:
I found a solution https://github.com/bit-twit/poi-shift-column/blob/master/src/main/java/org/bittwit/poi/ExcelOpener.java. It's working fine.
来源:https://stackoverflow.com/questions/46405454/insert-a-new-column-in-between-to-an-existing-excel-file-using-apache-poi