Solved

ASP.net table vs Excel cell size

Posted on 2013-11-11
2
526 Views
Last Modified: 2013-11-12
Hi

I am trying to make the cells in my ASP.net table the same size as a standard Excel cell
using:
    tCell.Width = 48
    tCell.Height = 15
but the ASP.net table cell is bigger than an Excel cell size.
Does anyone know how to achieve this, in other words what proportion bigger an
ASP.net table cell is bigger than an Excel cell?
0
Comment
Question by:murbro
2 Comments
 
LVL 96

Accepted Solution

by:
Bob Learned earned 500 total points
ID: 39641478
You have to understand how Excel uses widths:

Description of how column widths are determined in Excel
http://support.microsoft.com/kb/214123

Excel begins with a default width of 8 characters and translates this into a given number of pixels, depending on the Normal style font. It then rounds this number up to the nearest multiple of 8 pixels, so that scrolling across columns and rows is faster. The pixel width is stored internally in Excel for positioning data on the screen. The number that you see in the Column Width dialog box is the pixel width re-translated into character units (based on the Normal font) for display.

A column width of 8.43 means that 8.43 of the default font's characters fit into a cell. The default font for the worksheet is the font that is assigned to the Normal style. Excel 2000 uses a factory default font of Arial 10.
0
 

Author Closing Comment

by:murbro
ID: 39641519
Thanks
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Improved? Move/Copy Add-in Replacement - How to avoid the annoying, “A formula or sheet you want to move or copy contains the name XXX, which already exists on the destination worksheet.” David Miller (dlmille)  It was one of those days… I wa…
This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question