English 中文(简体)
利用开放的xml sdk代码,如何将一个表(用文字文件)改成页数?
原标题:Using open xml sdk code, how to resize a table (in ms word document) to fit into page margins?

我正在使用Microsoft Open XML SDK,以产生一份文字文件。 我使用了Open XML SDK 2.0生产力工具,将文字文件转换为C#代码,因此,我通过概述表格制作法,创建了一个包装类别。 我成功地制作了文字文件。

But the issue is, some tables are expanding in their width beyondpage margins. I searched in google, and found that GrowAutoFit class allows Tables to AutoFit into page margins, but I couldn t find the exact usage of this class to implement the functionality.

www.un.org/Depts/DGACM/index_spanish.htm 我在提出这个问题之前用了几天的时间,因为我阅读了在本论坛提出问题的条件。 我急于找工作,我在此提出这一询问。 因此,请让我提出解决办法。

最佳回答

www.un.org/Depts/DGACM/index_spanish.htm 我就我自己的问题找到了答案。

The reason for the tables extending out of page was that i had set page margins as zero in the code. So, after i set the page margins as 1 inch on all sides, the tables are not extending out of margins.

Thanks to the Office Open XML SDK Productivity tool, which shows the native XML code, and also the C# code when a word document is opened in it. And becuase of this tool, i was able to figure out the issue.

感谢您的建议 最大程度:

问题回答

暂无回答




相关问题
Manually implementing high performance algorithms in .NET

As a learning experience I recently tried implementing Quicksort with 3 way partitioning in C#. Apart from needing to add an extra range check on the left/right variables before the recursive call, ...

Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

How do I compare two decimals to 10 decimal places?

I m using decimal type (.net), and I want to see if two numbers are equal. But I only want to be accurate to 10 decimal places. For example take these three numbers. I want them all to be equal. 0....

Exception practices when creating a SynchronizationContext?

I m creating an STA version of the SynchronizationContext for use in Windows Workflow 4.0. I m wondering what to do about exceptions when Post-ing callbacks. The SynchronizationContext can be used ...

Show running instance in single instance application

I am building an application with C#. I managed to turn this into a single instance application by checking if the same process is already running. Process[] pname = Process.GetProcessesByName("...

How to combine DataTrigger and EventTrigger?

NOTE I have asked the related question (with an accepted answer): How to combine DataTrigger and Trigger? I think I need to combine an EventTrigger and a DataTrigger to achieve what I m after: when ...

热门标签