protected void Page_Load(object sender, EventArgs e) { AceoffixCtrl1.ServerPage = "../aceoffix-runtime/server.aspx"; AceoffixCtrl1.Theme = Aceoffix.ThemeType.Office2007; AceoffixCtrl1.BorderStyle = Aceoffix.BorderStyleType.BorderThin; Aceoffix.WordWriter.WordDocument doc = new Aceoffix.WordWriter.WordDocument(); Aceoffix.WordWriter.Table table1 = doc.OpenDataRegion("Table1").CreateTable(3, 5, Aceoffix.WordWriter.WdAutoFitBehavior.wdAutoFitWindow); table1.OpenCellRC(1, 1).MergeTo(3, 1); table1.OpenCellRC(1, 1).Value = "The merged cells"; for (int i = 1; i < 4; i++) { table1.OpenCellRC(i, 2).Value = "AA" + i.ToString(); table1.OpenCellRC(i, 3).Value = "BB" + i.ToString(); table1.OpenCellRC(i, 4).Value = "CC" + i.ToString(); table1.OpenCellRC(i, 5).Value = "DD" + i.ToString(); } Aceoffix.WordWriter.DataRegion drTable2 = doc.CreateDataRegion("Table2", Aceoffix.WordWriter.DataRegionInsertType.After, "Table1"); Aceoffix.WordWriter.Table table2 = doc.OpenDataRegion("Table2").CreateTable(5, 5, Aceoffix.WordWriter.WdAutoFitBehavior.wdAutoFitWindow); for (int i = 1; i < 6; i++) { table2.OpenCellRC(i, 1).Value = "AA" + i.ToString(); table2.OpenCellRC(i, 2).Value = "BB" + i.ToString(); table2.OpenCellRC(i, 3).Value = "CC" + i.ToString(); table2.OpenCellRC(i, 4).Value = "DD" + i.ToString(); table2.OpenCellRC(i, 5).Value = "EE" + i.ToString(); } AceoffixCtrl1.Bind(doc); AceoffixCtrl1.CustomToolbar = false; AceoffixCtrl1.Menubar = false; AceoffixCtrl1.OpenDocument("doc/test.doc", Aceoffix.OpenModeType.docNormalEdit, "Tom"); }
protected void Page_Load(object sender, EventArgs e) { AceoffixCtrl1.ServerPage = "../aceoffix-runtime/server.aspx"; Aceoffix.WordWriter.WordDocument doc = new Aceoffix.WordWriter.WordDocument(); Aceoffix.WordWriter.DataRegion dTable = doc.OpenDataRegion("table"); dTable.Editing = true; Aceoffix.WordWriter.Table table1 = doc.OpenDataRegion("Table").OpenTable(1); table1.OpenCellRC(1, 2).Value = "Product 1"; table1.OpenCellRC(1, 3).Value = "Product 2"; table1.OpenCellRC(2, 1).Value = "A"; table1.OpenCellRC(3, 1).Value = "B"; AceoffixCtrl1.AddCustomToolButton("Save", "Save", 1); AceoffixCtrl1.AddCustomToolButton("Full-screen Switch", "IsFullScreen", 4); AceoffixCtrl1.Bind(doc); AceoffixCtrl1.SaveDataPage = "savedata.aspx"; AceoffixCtrl1.OpenDocument("doc/test.doc", Aceoffix.OpenModeType.docSubmitForm, "John Scott"); }
protected void Page_Load(object sender, EventArgs e) { AceoffixCtrl1.ServerPage = "../aceoffix-runtime/server.aspx"; Aceoffix.WordWriter.WordDocument doc = new Aceoffix.WordWriter.WordDocument(); Aceoffix.WordWriter.Table table1 = doc.OpenDataRegion("Table1").OpenTable(1); table1.OpenCellRC(1, 1).Value = "Aceoffix"; int dataRowCount = 5; //Insert the number of rows int oldRowCount = 3; //The original number of rows in tables for (int j = 0; j < dataRowCount - oldRowCount; j++) { table1.InsertRowAfter(table1.OpenCellRC(2, 5)); } int i = 1; while (i <= dataRowCount) { table1.OpenCellRC(i, 2).Value = "AA" + i.ToString(); table1.OpenCellRC(i, 3).Value = "BB" + i.ToString(); table1.OpenCellRC(i, 4).Value = "CC" + i.ToString(); table1.OpenCellRC(i, 5).Value = "DD" + i.ToString(); i++; } AceoffixCtrl1.Bind(doc); AceoffixCtrl1.OpenDocument("doc/test.doc", Aceoffix.OpenModeType.docNormalEdit, "John Scott"); }
protected void Page_Load(object sender, EventArgs e) { AceoffixCtrl1.ServerPage = "../aceoffix-runtime/server.aspx"; Aceoffix.WordWriter.WordDocument doc = new Aceoffix.WordWriter.WordDocument(); Aceoffix.WordWriter.Table table = doc.OpenDataRegion("Table1").OpenTable(1); table.OpenCellRC(1, 1).MergeTo(1, 5); table.OpenCellRC(1, 1).Value = "Aceoffix"; table.OpenCellRC(1, 1).Font.Color = Color.Red; table.OpenCellRC(1, 1).Font.Size = 24; table.OpenCellRC(1, 1).Font.Name = "Andalus"; table.OpenCellRC(1, 1).ParagraphFormat.Alignment = Aceoffix.WordWriter.WdParagraphAlignment.wdAlignParagraphCenter; AceoffixCtrl1.Menubar = false; AceoffixCtrl1.CustomToolbar = false; AceoffixCtrl1.Bind(doc); AceoffixCtrl1.SaveDataPage = "savedata.aspx"; AceoffixCtrl1.OpenDocument("doc/test.doc", Aceoffix.OpenModeType.docSubmitForm, "John Scott"); }
protected void Page_Load(object sender, EventArgs e) { AceoffixCtrl1.ServerPage = "../aceoffix-runtime/server.aspx"; Aceoffix.WordWriter.WordDocument wd = new Aceoffix.WordWriter.WordDocument(); Aceoffix.WordWriter.DataRegion dataRegion = wd.OpenDataRegion("ACE_Table"); Aceoffix.WordWriter.Table table = dataRegion.OpenTable(1); table.OpenCellRC(3, 1).Value = "Tom"; table.OpenCellRC(3, 2).Value = "201501"; table.OpenCellRC(3, 3).Value = "Development"; table.OpenCellRC(3, 4).Value = "John Scott"; table.OpenCellRC(3, 5).Value = "$5000"; table.InsertRowAfter(table.OpenCellRC(3, 5)); table.OpenCellRC(4, 1).Value = "Jack"; table.OpenCellRC(4, 2).Value = "201502"; table.OpenCellRC(4, 3).Value = "Sales"; table.OpenCellRC(4, 4).Value = "Anna"; table.OpenCellRC(4, 5).Value = "$5500"; AceoffixCtrl1.Bind(wd); AceoffixCtrl1.OpenDocument("doc/test.doc", Aceoffix.OpenModeType.docNormalEdit, "John Scott"); }