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

  • SEARCH
  • Home
  • 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 290293
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T05:59:04+00:00 2026-05-12T05:59:04+00:00

I want to copy tabular data to Excel from my app. The most simple

  • 0

I want to copy tabular data to Excel from my app. The most simple way I found so far was using HTML as the intermediary format. After reading this question, I could preserve the formatting of my data. Is there a way to keep the width of the columns, too? I tried to set the style in various ways:

<td style="width:100;">...</td>
<td style="width:100px;">...</td>
<td style="width:100pt;">...</td>

but to no avail. Any ideas?

For bonus points, is there a place where I can find a description of Excel’s HTML “format”?

[EDIT] Update: I’ve written a small tool to dump the transfer type “XML Stylesheet”. This is a self contained XML document. It also contains column widths. But a quick test shows that Excel ignores the column widths completely, even when I cut&paste between two tables 🙁 So unless someone can tell me an option to change this behavior, I guess it’s simply not possible to format the columns while pasting.

[EDIT2] I’ve found a way. After pasting, you get a little icon in the lower right corner which looks like the paste button in the toolbar. Here, you can select some options. One is “Keep width of source table”.

  • 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-12T05:59:04+00:00Added an answer on May 12, 2026 at 5:59 am

    I recommend the XML Spreadsheet format (the old 2002/2003 one–simpler to generate) over Excel’s ability to import HTML.

    I’ve done both and written libraries to export both directly from .NET, and the XML format is definitely less likely to make you lose sleep.

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

Sidebar

Related Questions

I want to copy files from one location(say pittsburgh) to another location(say melbourne) using
I want to copy all data from one database to another which has the
I want to copy a file from /data/data... to the external SDCARD! However, i'm
I want to copy csv data from different files and then store in a
I want to copy data from a DataTable to a SQL Server table; how
In my app I want to copy a custom class from one array to
I want to copy particular columns from one Excel sheet to another Excel sheet
I want to copy a file from A to B in C#. How do
I want to copy text files and only text files from src/ to dst/
I have a situation where I want to copy the output assembly from one

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.