Solved

ASP.net table vs Excel cell size

Posted on 2013-11-11
2
524 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
Comment Utility
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
Comment Utility
Thanks
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
Convert between Excel file formats (.XLS, .XLSX, .XLSM) with/without macro option David Miller (dlmille) Intro Over this past Fall, I've had the opportunity to see several similar requests and have developed a couple related solutions associate…
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.

771 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now