When adding multiple sheets, the additional sheets after the first sometimes get their cell styles improperly associated with a bad style.
For example, I had been setting a column to float with 2 decimals, but it was displaying as a Date, even though the prior sheet with the same format was showing correctly.
You can see this in the attached spreadsheet where column W on Sheets 2 and 3 are not displaying with the same format. If you look at the style applied to the cells, you'll find that one has S=2 and the other S=3.
I stepped through the code and the source sheet that is being copied has the correct StyleID for both sheets, but when Cloned, the second sheet has its cells improperly mapped (via the styleCashe dictionary) to a bad StyleID.
I've forked the code and submitted a patch; the gist being that I moved the styleCashe variable to a private instance variable _styleCashe of ExcelWorksheets.
For example, I had been setting a column to float with 2 decimals, but it was displaying as a Date, even though the prior sheet with the same format was showing correctly.
You can see this in the attached spreadsheet where column W on Sheets 2 and 3 are not displaying with the same format. If you look at the style applied to the cells, you'll find that one has S=2 and the other S=3.
I stepped through the code and the source sheet that is being copied has the correct StyleID for both sheets, but when Cloned, the second sheet has its cells improperly mapped (via the styleCashe dictionary) to a bad StyleID.
I've forked the code and submitted a patch; the gist being that I moved the styleCashe variable to a private instance variable _styleCashe of ExcelWorksheets.