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 8746865
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T12:15:45+00:00 2026-06-13T12:15:45+00:00

I am creating a word document(2010) using c#. It consists of a large table

  • 0

I am creating a word document(2010) using c#.

It consists of a large table weith cells and within the cells paragraphs.

I Have achieved this with a little with (i hope simple) a little niggly issue. In front of every piece of text there is a block of empty space.enter image description here

I am attempting to get rid of this space with no luck.

To build the table I have pretty much followed this example.

http://msdn.microsoft.com/en-us/library/office/gg490656.aspx

I have tried fiddling with the sacing of the cells, of the table rows and of the table cells but i’m unsure if i am using the right properties.

I have tried appending new ContextualSpacing() { Val = false } to table row and cells with no luck. I’ve also tried new Spacing with no luck either!

Any ideas hints tips would be muchly appreciated

  • 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-06-13T12:15:45+00:00Added an answer on June 13, 2026 at 12:15 pm

    I found that setting the style to a style within word resolved the issue. This was a manual process and then i looked in to how to do this programatically.

    DocumentFormat.OpenXml.Wordprocessing.TableStyle tableStyle2 = new DocumentFormat.OpenXml.Wordprocessing.TableStyle() { Val = "TableGrid" };
    

    Append this item to the table and it all worked perfectly!

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

Sidebar

Related Questions

I'm creating a word document programatically using VBA. 1) I have a a string
I'm creating a Word 2010 document using C# and Microsoft.Office.Interop.Word . Using the Range.Paste
I'm creating a word document using mailmerge in word 2010 and I've got a
I am creating a word document with plain text content controls. I have added
I am creating a Microsoft Word document using the OpenXml library. Most of what
I creating a C# application that has to create a word document. I'm using
I'm creating a word document using (WordprocessingDocument myDoc = WordprocessingDocument.Create(@c:\generate\export.docx, WordprocessingDocumentType.Document)) { MainDocumentPart mainPart
Using .NET and the Word Interop I am programmatically creating a new Word doc
I am creating a custom add-in ribbon for MS Word 2010. I wanted to
I am currently in the process of creating API documentation using Microsoft Word 2007

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.