tag:blogger.com,1999:blog-1138151560829907108.post5056581772346219..comments2023-11-29T11:42:07.612-08:00Comments on Cathals Corner: DocX and TablesCathal Coffeyhttp://www.blogger.com/profile/03881111240501968880noreply@blogger.comBlogger70125tag:blogger.com,1999:blog-1138151560829907108.post-90104979917556873112022-01-29T23:18:17.436-08:002022-01-29T23:18:17.436-08:00Play Emperor Casino Games Online | Shootercasino
E...Play Emperor Casino Games Online | Shootercasino<br />Experience <a href="https://shootercasino.com/emperor-casino/" rel="nofollow">제왕카지노</a> the feeling of Emperor Casino at Shootercasino. We <a href="https://deccasino.com/review/merit-casino/" rel="nofollow">메리트카지노</a> provide online games like <a href="https://choegocasino.com/" rel="nofollow">카지노사이트</a> blackjack, baccarat, roulette, scratch cards and so much more!Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-1138151560829907108.post-28160917052931490102020-09-22T02:21:41.659-07:002020-09-22T02:21:41.659-07:00Me too. I have tha same problemMe too. I have tha same problemAxiohttps://www.blogger.com/profile/01789436566780390760noreply@blogger.comtag:blogger.com,1999:blog-1138151560829907108.post-40060015774810532522020-08-12T02:11:52.858-07:002020-08-12T02:11:52.858-07:00Hi there, You have done an excellent post on DOCX ...Hi there, You have done an excellent post on <a href="https://www.subsystems.com/dhw.htm" rel="nofollow">DOCX - HTML Converter</a>. I’ll certainly digg it and personally recommend to my friends. John smithhttps://www.blogger.com/profile/14911264455855598089noreply@blogger.comtag:blogger.com,1999:blog-1138151560829907108.post-76605656649050596312020-05-07T06:42:31.500-07:002020-05-07T06:42:31.500-07:00That spinner will helps you to transfer you one fi...That spinner will helps you to transfer you one file to other formats;<br /><br /><a href="https://filespinner.blogspot.com/2020/03/how-to-convert-odg-file-to-pdf-file.html" rel="nofollow">Odg to Pdf</a><br /><br /><a href="https://filespinner.blogspot.com/2020/03/how-to-convert-convert-mkv-file-to-mp3.html" rel="nofollow">Mkv to Mp3</a><br /><br /><a href="https://filespinner.blogspot.com/2020/03/how-to-convert-mp4-file-to-swf-file.html" rel="nofollow">Mp4 to Swf</a><br /><br /><a href="https://filespinner.blogspot.com/2020/03/how-to-convert-ogv-file-to-zip-file.html" rel="nofollow">Ogv to Zip</a><br /><br /><a href="https://filespinner.blogspot.com/2020/03/how-to-convert-docx-file-to-zip-file.html" rel="nofollow">Docx to Zip</a>Fonts Maniahttps://www.blogger.com/profile/18406244480702938446noreply@blogger.comtag:blogger.com,1999:blog-1138151560829907108.post-25429046055775109682020-05-07T06:41:47.725-07:002020-05-07T06:41:47.725-07:00Hey Guys use this online converter for file conver...Hey Guys use this online converter for file converting;<br /><br /><a href="https://filespinner.blogspot.com" rel="nofollow">File Spinner</a>Fonts Maniahttps://www.blogger.com/profile/18406244480702938446noreply@blogger.comtag:blogger.com,1999:blog-1138151560829907108.post-79916730612465712312019-07-07T14:41:01.083-07:002019-07-07T14:41:01.083-07:00FYI: I had to change the font part to: ....Font(&q...FYI: I had to change the font part to: ....Font("Arial").....<br /><br />I was originally running program in Visual Studio 2015, using DocX.1.0.0.22 - and no problems with ...FontFamily(new FontFamily("Arial"))....<br /><br />I moved software to Visual Studio 2019, and am using the latest DocX (DocXCore.1.0.4). I got a string conversion error. Now, it works with just ...Font("Arial")...Anonymoushttps://www.blogger.com/profile/14526751856844315542noreply@blogger.comtag:blogger.com,1999:blog-1138151560829907108.post-18494452106382311632019-06-24T23:53:54.659-07:002019-06-24T23:53:54.659-07:00yes..even i am facing the same issue. how can we a...yes..even i am facing the same issue. how can we achieve table within a table using this lib.Chaitanyahttps://www.blogger.com/profile/14413316439917058336noreply@blogger.comtag:blogger.com,1999:blog-1138151560829907108.post-19893757771841351992019-03-09T13:11:12.154-08:002019-03-09T13:11:12.154-08:00Hi! Did You find solution for this issue?Hi! Did You find solution for this issue?Victorhttps://www.blogger.com/profile/05207655675476124153noreply@blogger.comtag:blogger.com,1999:blog-1138151560829907108.post-1871174692869336692019-02-22T17:21:02.570-08:002019-02-22T17:21:02.570-08:00Here is some code I use to create a document table...Here is some code I use to create a document table from a c# DataTable setting column sizes, header colour and font. You should be able to adapt this code for your own purposes <br /><br /><br /> private Novacode.Table AddTableToWord(Novacode.DocX document, DataTable table, double[] columnsizes, double fontsize)<br /> {<br /> Novacode.Table t = document.InsertTable(table.Rows.Count + 1, table.Columns.Count);<br /> // Set the column sizes<br /> t.AutoFit = Novacode.AutoFit.ColumnWidth;<br /> for (int x = 0; x < t.ColumnCount; x++)<br /> {<br /> //t.SetColumnWidth(x, columnsizes[x]);<br /> for (int y = 0; y < t.RowCount; y++)<br /> {<br /> t.Rows[y].Cells[x].Width = columnsizes[x] * 37.8; // Centimeter to Word conversion<br /> if (y > 0)<br /> t.Rows[y].Cells[x].VerticalAlignment = Novacode.VerticalAlignment.Top;<br /> else<br /> t.Rows[y].Cells[x].VerticalAlignment = Novacode.VerticalAlignment.Center; // Header is centered<br /> }<br /> }<br /><br /> // Write the header<br /> for (int x = 0; x < t.ColumnCount; x++)<br /> {<br /> t.Rows[0].Cells[x].Paragraphs.First().Append(table.Columns[x].ColumnName).Font(new FontFamily("Arial")).FontSize(fontsize).Color(Color.FromArgb(89, 119, 134)).Bold().Alignment = Novacode.Alignment.left;<br /> t.Rows[0].Cells[x].FillColor = Color.LightGray;<br /> }<br /><br /> int pos = 1;<br /> foreach (DataRow r in table.Rows)<br /> {<br /> for (int x = 0; x < t.ColumnCount; x++)<br /> {<br /> t.Rows[pos].Cells[x].Paragraphs.First().Append(r[x].ToString()).Font(new FontFamily("Arial")).FontSize(fontsize).Color(Color.Black).Alignment = Novacode.Alignment.left;<br /> }<br /> pos++;<br /> }<br /> t.Rows[0].TableHeader = true;<br /><br /> return t;<br /> }<br />Anonymoushttps://www.blogger.com/profile/14345224090448051290noreply@blogger.comtag:blogger.com,1999:blog-1138151560829907108.post-50079318842960943892019-02-22T11:55:50.212-08:002019-02-22T11:55:50.212-08:00Hello, is there any way to set the font size for t...Hello, is there any way to set the font size for the whole table or for specific cells?Jose Figueroahttps://www.blogger.com/profile/11388562354502906150noreply@blogger.comtag:blogger.com,1999:blog-1138151560829907108.post-85506842301123416972018-09-03T04:42:46.992-07:002018-09-03T04:42:46.992-07:00I have the same problem. Can you resolve it?I have the same problem. Can you resolve it?Jaymehttps://www.blogger.com/profile/15365533246549133780noreply@blogger.comtag:blogger.com,1999:blog-1138151560829907108.post-71847242366617961002018-09-03T04:42:07.637-07:002018-09-03T04:42:07.637-07:00This comment has been removed by the author.Jaymehttps://www.blogger.com/profile/15365533246549133780noreply@blogger.comtag:blogger.com,1999:blog-1138151560829907108.post-38801898153782183552018-07-06T05:32:59.173-07:002018-07-06T05:32:59.173-07:00Hi the library is really helpful but I am stuck wh...Hi the library is really helpful but I am stuck while adding a table inside a parent table cell . My documents as a nested table structure <br /><br />i am doing it as <br />maintable.Rows[0].Cells[0].InsertTable(childtbale).Alignment = Alignment.center;<br /><br />but when I open the document it show the message "the document cannot be opened because there are problem with contents " <br /><br />Thanks In advanceAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-1138151560829907108.post-17133166271658654322017-12-27T00:41:04.339-08:002017-12-27T00:41:04.339-08:00Hi Excellent library, I am using it to convert xml...Hi Excellent library, I am using it to convert xml to doc (250 pages). I'm just struggling with SetTableCellMargin, it does not seem to have any effect (I tried values from 0.5 to 50, not knowing the unit it must use). Do I miss something? <br /> <br />Table tab = doc.AddTable(5, 4);<br />tab.SetWidthsPercentage(new float[] { 25, 45, 10, 20 }, doc.PageWidth - doc.MarginLeft - doc.MarginRight);<br />tab.SetTableCellMargin(TableCellMarginType.bottom, 50);<br />tab.SetTableCellMargin(TableCellMarginType.top, 50);<br />Anonymoushttps://www.blogger.com/profile/10899079063615703540noreply@blogger.comtag:blogger.com,1999:blog-1138151560829907108.post-13190235453535282142017-11-13T07:53:55.420-08:002017-11-13T07:53:55.420-08:00Try this:
var tableBookmark = document.Bookmarks.F...Try this:<br />var tableBookmark = document.Bookmarks.FirstOrDefault(b => b.Name == "tableBookmark");<br />var newTable = tableBookmark.Paragraph.InsertTableAfterSelf(5,5);Anonymoushttps://www.blogger.com/profile/11418466959688815067noreply@blogger.comtag:blogger.com,1999:blog-1138151560829907108.post-18068649774661238262017-09-19T16:15:59.192-07:002017-09-19T16:15:59.192-07:00Very good! Thank you for your helpVery good! Thank you for your helpAnonymoushttps://www.blogger.com/profile/05401269028965679752noreply@blogger.comtag:blogger.com,1999:blog-1138151560829907108.post-17329671979197129362017-09-12T18:31:50.457-07:002017-09-12T18:31:50.457-07:00I've never got SetWidths to work correctly eit...I've never got SetWidths to work correctly either. Here's how I set my column sizes by explicitly setting the column width to each cell in the table:<br /><br />Novacode.Table t = document.AddTable(rows,columns);<br />t.AutoFit = Novacode.AutoFit.ColumnWidth;<br /> for (int x = 0; x < t.ColumnCount; x++)<br /> {<br /> //t.SetColumnWidth(x, columnsizes[x]);<br /> for (int y = 0; y < t.RowCount; y++)<br /> {<br /> t.Rows[y].Cells[x].Width = columnsizes[x];<br /> }<br /> }<br /><br />Anonymoushttps://www.blogger.com/profile/14345224090448051290noreply@blogger.comtag:blogger.com,1999:blog-1138151560829907108.post-36200171337045771892017-09-12T18:22:29.969-07:002017-09-12T18:22:29.969-07:00Hi, I have a problem with the width of the columns...Hi, I have a problem with the width of the columns, when I insert text into the cell, change the width of the column, I used these codes, but the problem continues, is there other way?<br /><br />float[] colums = new float[] { 40, 150, 150, 300 };<br />tWhatsapp.SetWidths(colums);<br /><br />tWhatsapp.Rows[i].Cells[2].Width = 150;Anonymoushttps://www.blogger.com/profile/05401269028965679752noreply@blogger.comtag:blogger.com,1999:blog-1138151560829907108.post-21619786925796550892017-09-12T16:53:19.240-07:002017-09-12T16:53:19.240-07:00Excellent, thanks a lot!!Excellent, thanks a lot!!Anonymoushttps://www.blogger.com/profile/05401269028965679752noreply@blogger.comtag:blogger.com,1999:blog-1138151560829907108.post-11420009468703335662017-09-12T13:40:06.058-07:002017-09-12T13:40:06.058-07:00It's quite easy to do:
Novacode.T...It's quite easy to do:<br /><br /> Novacode.Table t = document.AddTable(3, 5);<br /> t.Rows[0].Cells[0].FillColor = Color.LightGray;<br />Anonymoushttps://www.blogger.com/profile/14345224090448051290noreply@blogger.comtag:blogger.com,1999:blog-1138151560829907108.post-77101650765369908202017-09-12T06:53:59.800-07:002017-09-12T06:53:59.800-07:00I faced similar issue. Did you get any solution?I faced similar issue. Did you get any solution?Dharmavarapu Abhiramhttps://www.blogger.com/profile/04773419543321637098noreply@blogger.comtag:blogger.com,1999:blog-1138151560829907108.post-74476635159932034672017-09-06T18:29:24.035-07:002017-09-06T18:29:24.035-07:00Hi,
I want to add a BackgroundColor to Cell, how ...Hi, <br />I want to add a BackgroundColor to Cell, how can I do it? Can you tell me an example, please? Thanks.Anonymoushttps://www.blogger.com/profile/05401269028965679752noreply@blogger.comtag:blogger.com,1999:blog-1138151560829907108.post-66719792623794058232017-08-01T14:04:25.215-07:002017-08-01T14:04:25.215-07:00Hi,
I have a table with 5 columns but table.Insert...Hi,<br />I have a table with 5 columns but table.InsertRow() keeps creating the row with only 3 cells. How can I prevent this?<br />Thanks.Ivana Bulićhttps://www.blogger.com/profile/06787762135070062840noreply@blogger.comtag:blogger.com,1999:blog-1138151560829907108.post-62005902084102826952017-06-10T02:31:03.874-07:002017-06-10T02:31:03.874-07:00Hello, I want to update TOC of word document after...Hello, I want to update TOC of word document after I processed on document and replaced data in template and saved as new document at different place. I am done with all other processing but how can I update the 'Table of Content' by using DocX library. Is there any auto update method exist for the same. Anonymoushttps://www.blogger.com/profile/02796484163489070110noreply@blogger.comtag:blogger.com,1999:blog-1138151560829907108.post-29157849206704853152017-03-16T07:10:29.785-07:002017-03-16T07:10:29.785-07:00SameSameAnonymoushttps://www.blogger.com/profile/17279194921420459658noreply@blogger.com