Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3969138
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T03:55:40+00:00 2026-05-20T03:55:40+00:00

Setup: Open Excel 2007, set the width of the first column to 15.0 (110

  • 0

Setup: Open Excel 2007, set the width of the first column to 15.0 (110 px), the height of the first row to 30.0 (40 px), split the widow pane in four at the first cell, and save the file.

When you open the file with the Open XML SDK 2.0 Productivity Tool the column width is “15.7109375” and the height is “30”, yet the xSplit value is “2040” and the ySplit value is “795”.

Can someone please explain how can I convert “15.0” to “110 px” to “15.7109375 width” to “2040 xSplit” for columns, and “30.0” to “40 px” to “30 ht” to “795 ySplit” for rows?

How can I calculate these numbers and convert from one to the other?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T03:55:40+00:00Added an answer on May 20, 2026 at 3:55 am

    I recently had to work this out on an open source project so I thought that I’d post an answer here to help anyone else who encounters the same problem.

    The calculation for the internal column width is documented in the ECMA-376 Part 1 and elsewhere.

    The internal row height is the same as the height shown in the Excel interface.

    The split pane xSplit and ySplit dimensions are the tricky ones. I didn’t find any specific documentation on how they are calculated apart from the fact that they are in units of 1/20 of a point. The calculations for these I deduced from interpolated data extracted from xlsx files and from similar calculations used in the xls file format.

    Here is an example in Perl that demonstrates the calculations:

    #!/usr/bin/perl -l
    
    use warnings;
    use strict;
    
    my $width  = 15;
    my $height = 30;
    
    print "Column width in characters = ", calculate_column_width( $width );
    print "Column width for xSplit    = ", calculate_x_split_width( $width ), "\n";
    
    print "Row height in characters  = ", $height;
    print "Row height for ySplit     = ", calculate_y_split_height( $height );
    
    
    #
    # Convert column width from user units to character width.
    #
    sub calculate_column_width {
    
        my $width = shift;
    
        my $max_digit_width = 7;    # For Calabri 11.
        my $padding         = 5;
    
        $width = ( $width * $max_digit_width + $padding ) / $max_digit_width;
        $width = int( $width * 256 ) / 256;
    
        return $width;
    }
    
    
    #
    # Convert column width from user units to pane split width.
    #
    sub calculate_x_split_width {
    
        my $width = shift;
    
        my $max_digit_width = 7;    # For Calabri 11.
        my $padding         = 5;
        my $pixels;
    
        # Convert to pixels.
        if ( $width < 1 ) {
            $pixels = int( $width * 12 + 0.5 );
        }
        else {
            $pixels = int( $width * $max_digit_width + 0.5 ) + $padding;
        }
    
        # Convert to points.
        my $points = $pixels * 3 / 4;
    
        # Convert to twips (twentieths of a point).
        my $twips = $points * 20;
    
        # Add offset/padding.
        $width = $twips + 390;
    
        return $width;
    }
    
    
    #
    # Convert row height from user units to pane split height.
    #
    sub calculate_y_split_height {
    
        my $height = shift;
    
        $height = int( 20 * $height + 300 );
    
        return $height;
    }
    
    __END__
    

    The output from this is:

    Column width in characters = 15.7109375
    Column width for xSplit    = 2040
    
    Row height in characters  = 30
    Row height for ySplit     = 900
    

    Note, the ySplit value isn’t the same as the value in your question. However it does correlate with values extracted from several sample xlsx files that I tried. Perhaps, your sample file was using a different default font height.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I setup my own open id provider on my personal server, and added a
I want to set up a continuous integration and test framework for my open
Macros refuse to run for me in Excel 2007 on Windows Server 2003. The
I'm getting an Automation error upon running VBA code in Excel 2007. I'm attempting
One of my users is having an issue when trying to open an Excel
I've created a project of type Excel 2007 Template in Visual Studio 2008, and
i have to use code this.setUp(http://www.remax.com/, *firefox); selenium.open(/404/index.aspx?aspxerrorpath=/public/pages/searchresults.aspx); slenium.click(link=Find a RE/MAX Office); selenium.waitForPageToLoad(30000); selenium.selectFrame(REMAX
Setup Have you ever had the experience of going into a piece of code
Setup I have a website that draws RSS feeds and displays them on the
Setup is following: Drupal project, one svn repo with trunk/qa/production-ready branches, vhosts for every

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.