Пример #1
0
        private void button4_Click(object sender, EventArgs e)
        {
            DocXClass.addTable(file, 3, 3, new string[] { "1", "2", "3" });
            DocX  document = DocXClass.getDocx(file);
            Table t        = DocXClass.getTables(document)[0];

            //document.Save();
            DocXClass.setCellvalue(t, 1, 0, "a");
            DocXClass.setCellvalue(t, 1, 1, "b");
            DocXClass.setCellvalue(t, 1, 2, "c");
            DocXClass.mergeCells(t, true, 2, 0, 2);
            DocXClass.setCellvalue(t, 2, 0, "merge");
            //document.Save();
            DocXClass.saveTable(ref document);
        }
Пример #2
0
 private void button6_Click(object sender, EventArgs e)
 {
     DocXClass.addPicture(file, @"ning24.jpg");
 }
Пример #3
0
 private void button5_Click(object sender, EventArgs e)
 {
     DocXClass.addNewpage(file);
 }
Пример #4
0
 private void button3_Click(object sender, EventArgs e)
 {
     DocXClass.addText("F:\\example.docx", textBox1.Text);
 }
Пример #5
0
 private void button1_Click(object sender, EventArgs e)
 {
     DocXClass.createDoc("F:\\", "example.doc");
     DocXClass.setHeaderFooter("F:\\example.docx", "header", "footer");
 }