ColumnWidthToPixels - what is this for?

What does WorkSheet.ColumnWidthToPixels do?

Does it set all columns widths on the sheet to ACCEPT pixels as a width? SO that I can do
range.Cell.ColumnWidth = pixelValue


1 Reply

MW Melba Winshia Syncfusion Team November 9, 2006 01:31 PM UTC

Hi rob,

1) ColumnWidthToPixels property is used to convert the ColumnWidth to Pixels. It will return the columwidth in the pixel format. You can use this property to get the column width in pixels.

Here is the sample for your reference to get the columnwidth in pixels.

ColumnWidthToPixel.zip


2) But you can not set range.Cell.ColumnWidth = pixelValue. Because range["A1"].ColumnWidth will not set the width in pixels. You can use this property just to get the column width in pixels.

Please take a look and let me know if you have any other questions.

Thanks,
Melba

Loader.
Up arrow icon