We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Autofitcolumns not working, included example attachment

Thread ID:

Created:

Updated:

Platform:

Replies:

69317 Oct 24,2007 02:58 AM Oct 25,2007 09:01 AM ASP.NET Web Forms (Classic) 6
loading
Tags: XlsIO
Bert Vanpeteghem
Asked On October 24, 2007 02:58 AM

Hi,

Autofitcolumn goes wrong on columns including a formula.

Nothing strange happens in the example, just a SUM(range) formula on a couple of rows.

XlsIO refuses to autofit the formula Column

I included a sample based on the sample in this thread:
http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=63522

If the autofit is not working propery, is there any work-around for manually calculating and setting the widths?

Thanks

TestSample.zip

Anonymous
Replied On October 24, 2007 04:21 AM

XlsIO doesn't evaluate formula values, so if you want XlsIO to autofit formula value correctly, you should try to set
IRange.FormulaNumberValue or IRange.FormulaStringValue and then XlsIO should use one of those values to evaluate cell dimensions.

Bert Vanpeteghem
Replied On October 24, 2007 04:27 AM

Ok, thanks for the reply.

2 questions:

- In the sample, when calling FormulaNumberValue or FormulaStringValue on the Formula Range, the return 0.0 and NULL. What's my problem there?

- Can you give some pointers on how to calculate the width based on the value in the cell?

Thanks


Bert Vanpeteghem
Replied On October 24, 2007 04:33 AM

Ignore my previous post. Problem solved

>Ok, thanks for the reply.

2 questions:

- In the sample, when calling FormulaNumberValue or FormulaStringValue on the Formula Range, the return 0.0 and NULL. What's my problem there?

- Can you give some pointers on how to calculate the width based on the value in the cell?

Thanks


Bert Vanpeteghem
Replied On October 24, 2007 10:00 AM

Problem not solved: I narrowed it down to bold columns. If I set all as non-bold, it all fits perfectly.

See example in attachmen

TestSample.zip

Bert Vanpeteghem
Replied On October 24, 2007 10:21 AM

Correction: Combination of bold and formula column.

This sample: http://websamples.syncfusion.com/samples/XlsIO.Windows/F63522_1/main.htm

only shows that bold works

Anonymous
Replied On October 25, 2007 09:01 AM

I have tried your sample, all values seems to be visible.
Which cell (cells) wasn't autofitted good enough?

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;