Bestfit

Questions and answers on how to use XLSReadWriteII 3/4/5.
Post Reply
antonb
Posts: 4
Joined: Tue Mar 02, 2010 11:25 am

Bestfit

Post by antonb »

Hi,

I am trying to use the BestFit column property, but i can't see that it does anything? What is it supposed to do?

Anton Bosch
larsa
Site Admin
Posts: 926
Joined: Mon Jun 27, 2005 9:30 pm

Re: Bestfit

Post by larsa »

Hello

The BestFit property is used by Excel 2007 files. I have never tested it, so I can't tell if it works.
If you want to size a column to the text width, use:

XLS.Sheets[x].Columns.AddIfNone(Col1,Col2 - Col1 + 1);
XLS.Sheets[x].AutoWidthCol(Col1,Col2);
Lars Arvidsson, Axolot Data
Post Reply