由于我是OpenXML的新手,我自己学习它并获得有关OpenXML的基本知识,但现在我愿意学习如何使用OpenXML通过C#代码操作word文档。
所以请建议我这方面的好文件。
答案 0 :(得分:0)
您可以在 MSDN 找到它,这是RemoteViews remoteViews = new RemoteViews(getPackageName(),
settings.getAttributeId(settings.getThemeByString(), R.attr.theme_dependent_notification));
remoteViews.setOnClickPendingIntent(R.id.prev, ppreviousIntent);
remoteViews.setOnClickPendingIntent(R.id.play, pplayIntent);
remoteViews.setOnClickPendingIntent(R.id.next, pnextIntent);
remoteViews.setOnClickPendingIntent(R.id.close, pcloseIntent);
remoteViews.setImageViewBitmap(R.id.cover, icon);
remoteViews.setTextViewText(R.id.name, title);
remoteViews.setTextViewText(R.id.artist, text);
remoteViews.setTextViewText(R.id.count, count);
if (isPlayerActive) remoteViews.setImageViewResource(R.id.play, R.drawable.pause);
else remoteViews.setImageViewResource(R.id.play, R.drawable.play);
notification = new NotificationCompat.Builder(this)
.setSmallIcon(R.drawable.equalizer_icon)
.setContentTitle(title)
.setContentText(text)
.setTicker(getString(R.string.app_name))
.setContentIntent(pendingIntent)
.setPriority(Notification.PRIORITY_MAX)
.build();
notification.bigContentView = remoteViews;
系列:https://msdn.microsoft.com/en-us/library/office/cc850833.aspx
答案 1 :(得分:0)
您可以在codeproject.com
中关注此示例 using (WordprocessingDocument doc = WordprocessingDocument.Create
("D:\\test11.docx", DocumentFormat.OpenXml.WordprocessingDocumentType.Document))
{
// Add a main document part.
MainDocumentPart mainPart = doc.AddMainDocumentPart();
// Create the document structure and add some text.
mainPart.Document = new Document();
Body body = mainPart.Document.AppendChild(new Body());
Paragraph para = body.AppendChild(new Paragraph());
Run run = para.AppendChild(new Run());
// String msg contains the text, "Hello, Word!"
run.AppendChild(new Text("New text in document"));
}
答案 2 :(得分:0)
Wouter van Vugt的电子书 Open XML - 标记解释的第1章 涵盖了WordprocessingML的许多细节。 WordprocessingML是涵盖MS Word文档的OpenXML命名空间。您可以在此OpenXMLDeveloper.org post找到该书的PDF副本。您应该尽快下载副本,托管电子书的网站可能会关闭。