sliu
Forum Replies Created
-
AuthorPosts
-
September 27, 2016 at 7:15 pm in reply to: How to determine cell width based on cell contents? #3848
Ok, got it. OpenXml has the calculation.
Thanks!
September 27, 2016 at 6:10 pm in reply to: How to determine cell width based on cell contents? #3846In these two posts, they already knew the width of the columns. My question is how to determine the width of columns. For example, I have a string “Try this link as a starter”. What is the column width that can show all the words in the cell.
Thanks for replying
September 26, 2016 at 8:47 pm in reply to: How to determine cell width based on cell contents? #3841I meant how to calculate the width of a column so that when creating Spreadsheet via OpenXml the column width could be set reasonably.
Thanks!
I tried AutoOpen in .dotm. It doesn’t work. I’m using Office 2016. I think Microsoft has removed this feature. I just save the macro in Normal.dotm. This still works.
Thanks for your help!
I tried macro enabled Word document. I created AutoOpen and AutoExec macros in my docm. However the macros are not called when Word document opens. I don’t know how to invoke the macros automatically. So I will keep the macro in normal.dotm.
Thanks
September 13, 2016 at 4:47 pm in reply to: Open XML Package Editor for VS doesn't open .pptx as zip file #3779Thanks for the tips. I’ll try it.
Thanks
This issue has been resolved. How do I help?
Hi Eric,
I realized that in order to embed a document into pptx file the document has to be wrapped as ole object. Does OpenXml SDK provide API to convert PDF to OLE object? If not, do you have some knowledge on doing so in C#?
Thanks in advance!!!
PowerPoint adds header and footer into the original PDF file to create its oleobject.bin file in pptx. Does OpenXml SDK have api to handle all of this to load original pdf file?
Thanks in advance!!!
Hi Eric,
I realized my code for reading pdf content is correct. The problem is PowerPoint adds some header content before pdf content during embedding the ole object. I compared embedded pdf (oleObject1.bin) and my original pdf file. I see oleObject1.bin replaces the starting string -%PDF-1.5 – with some other header information then following with the rest of the original pdf content.
Hi Eric,
Do you know how Productivity Tool reads embedded objects in pptx? It loads all the objects, like image, video, audio, pdf, etc., into different string variables. If I use the string variable content created by Productivity Tool for embedded pdf, my code works. Do you know if Productivity Tool is open source on GitHub?
Thanks in advance!!!
I figured out. Thanks!
March 29, 2016 at 4:23 pm in reply to: Why new slides are not added to presentaion.xml sldIdList? #3301Ok, I didn’t know I cannot use both models on one open document. I can handle it to just use one model. I prefer Linq to Xml model, it is much easier to deal with modifying the content of the presentation.
Thanks for the explanation!!!
March 25, 2016 at 10:34 pm in reply to: Why new slides are not added to presentaion.xml sldIdList? #3276Hi Eric,
I found what causes the problem, but I don’t know why.
int Cx = doc.PresentationPart.Presentation.SlideSize.Cx;
int Cy = doc.PresentationPart.Presentation.SlideSize.Cy;XDocument pDoc = doc.PresentationPart.GetXDocument();
pDoc.Root.Descendants(P.sldId).First().Attribute(NoNamespace.id).Value = “260”;doc.PresentationPart.PutXDocument();
If you run this code, presentation.xml is not modified and the first slide id is not changed from 256 to 260. If you comment out the first 2 lines, the change is saved. I don’t know why getting slide size prevents updating presentation.xml.
Sorry, I’m not git savvy. I’ll see what I can do.
-
AuthorPosts