"Make sure you create all of your styles outside of the loop, and re-use them. ³
Ah! Makes sense! I actually create a new style for each and every cell. Since I can have up to 50,000 rows that is a total of 2.35 million separate styles. Yikes! Thanks, Chris Christopher Schene Field Engineer Global Fraud and Identity Solutions Experian 16260 N. 71st Street Suite #400 Scottsdale Arizona, USA 85254 +1 602.290.9792 mobile +1 480.751.3928 office [email protected] www.experian.com <http://www.experian.com/> On 11/4/15, 9:55 AM, "Nick Burch" <[email protected]> wrote: >On Wed, 4 Nov 2015, Schene, Chris wrote: >> I am using the code below to create a very large spread sheet that is 47 >> rows wide. >> >> There are a few very large strings in the rows, but for the most part >>the >> data is fairly small. >> >> If the .xls file is over about 1000 rows I get an error when I load the >> .xls file in excel saying it needs to repair the file and I lose all the >> row color and column width settings. > >Cell Styles are workbook scoped, not cell scoped. Make sure you create >all >of your styles outside of the loop, and re-use them. If you create one >style per cell, you'll use too many and Excel will sulk.... > >Nick > >--------------------------------------------------------------------- >To unsubscribe, e-mail: [email protected] >For additional commands, e-mail: [email protected] > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
