openxml

What are the RGB or HEX values of the default theme colors in Microsoft Word 2010?

邮差的信 提交于 2020-01-17 07:07:58
问题 I need to capture the color values for the scheme colors (i.e. accent1, accent2,....) in a Microsoft Word 2010 document. I have tried searching on the internet a lot but couldn't find any answer. Can any one help me with the reference for these colors? 回答1: Though i didn't get any answers for my question but I eventually found the answer and thought the share it for others' use. The theme color references can be found in the word/theme/theme1.xml file, however these references can not be

Manipulating simple bookmarks in Word

ぐ巨炮叔叔 提交于 2020-01-17 03:39:27
问题 There are a lot of questions, answers and posts about openXml, mainly good, thorough stuff that Eric White posts here (also here and other stack-overflow questions). The thing is the examples have two characteristics that make it difficult for me to apply: First, they are extremely end-to-end in the sense thay take care of every possible scenario possilbe (Like Eric White's XML flattening solution) and thus making the code too complicated. Second, the examples are more snippets and less

How can I make my bullets larger in Open XML?

大城市里の小女人 提交于 2020-01-16 07:50:17
问题 I'm generating docx files using the Open XML SDK for .NET The bullets in my lists are super tiny but I can't figure out why. So here's what I've done: Generating a doc with a single bulleted item Created a doc from Word with a single bulleted item Used Open XML Productivity Tools to compare both files Cannot for the life of me see any differences If I click on the bullet in both, to where it shows the font and size, they are both the same! I don't see any differences in the numbering section

Purpose of AbstractNum and NumberingInstance

旧巷老猫 提交于 2020-01-16 01:48:11
问题 1) I was thinking purpose of he AbstractNum is to reuse the numbering format and NumberingInstance is to create new list (restart at 1). But what I've noticed is if restart the second instance of the list at 1, openxml document will have a exact copy of the AbstractNum element (only difference is Nsid ) and a NumberingInstance pointing to that AbstractNum element. ex: If I have a list as follows Item 1 Item 2 and another list as below with exact same styling but restart at 1 Item 3 Item 4

Underlining and bolding text

元气小坏坏 提交于 2020-01-13 09:48:25
问题 how do I get the text to be underlined and bold? My text gets bold but does not get underlined. Here is some of my code, which is pretty straight forward uses run properties to bold and underline the given text. Run run_header = para_main.AppendChild(new Run()); RunProperties runProps = new RunProperties(); Bold bold = new Bold(); Underline ul = new Underline(); runProps.Append(bold); runProps.Append(ul); run_header.AppendChild(new RunProperties(runProps)); //run_header.AppendChild(new

ClosedXML - Creating multiple pivot tables

99封情书 提交于 2020-01-12 12:48:48
问题 I am trying to export some data to an excel sheet S1 whose data would be shown as Pivoted views in the next two sheets S2 and S3 . I am able to create a single pivot and it works perfect. But when I create two pivots, the consequent Excel file renders as corrupt. By corrupt I mean, On clicking yes, I get this - Here is the code I am using to create the pivots - using XL = ClosedXML.Excel; ... XL.XLWorkbook wb = new XL.XLWorkbook(); dsData = Session["ExportData"] as DataSet; var sheet1 = wb

ClosedXML - Creating multiple pivot tables

烈酒焚心 提交于 2020-01-12 12:45:47
问题 I am trying to export some data to an excel sheet S1 whose data would be shown as Pivoted views in the next two sheets S2 and S3 . I am able to create a single pivot and it works perfect. But when I create two pivots, the consequent Excel file renders as corrupt. By corrupt I mean, On clicking yes, I get this - Here is the code I am using to create the pivots - using XL = ClosedXML.Excel; ... XL.XLWorkbook wb = new XL.XLWorkbook(); dsData = Session["ExportData"] as DataSet; var sheet1 = wb

Get the Column Index of a Cell in Excel using OpenXML C#

久未见 提交于 2020-01-09 05:21:16
问题 I've been looking around for a while now and cannot seem to find out how to do this. I've got an excel sheet, which I'm reading using OpenXML. Now the normal thing would be to loop through the rows and then loop through the cells to get the values, which is fine. But along with the values I need the location of the cell, which would be in the format (rowindex, ColumnIndex). I've managed to get the rowIndex, but cant seem to figure out getting the column Index. I actually thought this was

Navigating Rich Text Control in OpenXml

て烟熏妆下的殇ゞ 提交于 2020-01-07 09:04:07
问题 I'm working with OpenXml and C#, I'm was using bookmarks but now might be switching over to Rich Text Controls. I was able to locate and work with the bookmarks, but i'm having some issues locating the Rich Text Controls. I'm trying the below: IEnumerable<SdtBlock> contentControlsDoc = null; ((MainDocumentPart)section).Document.Body.Descendants<SdtBlock>(); foreach (var contentControl in contentControlsDoc) { } I'm able to get 1 control, but sometimes I have a Rich Text Control within another

C# - OpenXML SDK 2.5 - Insert New Slide from Slide Masters with the layout that contains images

 ̄綄美尐妖づ 提交于 2020-01-07 06:57:27
问题 I used this [https://codingthedocument.wordpress.com/author/agschwantes/] to create my new slides with the help of the OpenXML 2.5 SDK. I designed and used my own Slide Master to create a new slide. My Slide Master includes some layouts with images and some layouts without images. If I create a slide from my Master Layout without images, everything works fine. If I create a slide with the layout, that contains images, I get the right layout BUT on top of every fixed images there is another