In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
PageOffice how to dynamically create data areas, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain for you in detail, people with this need can come to learn, I hope you can gain something.
CreateDataRegion method description:
CreateDataRegion (new data region name, relative to the location of the existing data region, existing data region name)
The CreateDataRegion method can only create a new data region before or after the existing data region in the template file. For example, a data region already exists in the Word template: PO_dr1. If you want to insert a data region PO_dr2 before this data region, how to implement ASP.NET:
PageOffice.WordWriter.DataRegion dr2 = doc.CreateDataRegion ("PO_dr2", PageOffice.WordWriter.DataRegionInsertType.Before, "PO_dr1")
How to implement JAVA:
DataRegion dr2 = doc.CreateDataRegion ("PO_dr2", DataRegionInsertType.Before, "PO_dr1")
If you want to insert a data region PO_dr1 after this data region PO_dr3,ASP.NET:
PageOffice.WordWriter.DataRegion dr3 = doc.CreateDataRegion ("PO_dr2", PageOffice.WordWriter.DataRegionInsertType.After, "PO_dr1")
How to implement JAVA:
DataRegion dr3 = doc.CreateDataRegion ("PO_dr3", DataRegionInsertType.After, "PO_dr1")
After the data region is created, you can assign values or do other operations like the original data region in the template.
Note: it is generally a user-defined data region that already exists in the document, but RelativeDataRegionName can also use two special data regions reserved by the PageOffice development platform: [HOME] and [END]. [HOME] and [END] do not need to be manually defined by the user to open the document, they represent the start and end cursor positions of the document, respectively.
If the current document is a blank document, no data region exists, and you can use [HOME] and [END] to generate an illustrated format document from a blank document. For example: insert a title at the beginning of the file, how to implement ASP.NET:
PageOffice.WordWriter.WordDocument doc = new PageOffice.WordWriter.WordDocument (); PageOffice.WordWriter.DataRegion title = doc.CreateDataRegion ("PO_title", PageOffice.WordWriter.DataRegionInsertType.After, "[home]"); / / assign a value to the DataRegion object title.Value = "sent by some company\ n"; title.Font.Bold = true;title.Font.Size = 20title.Font.Name = "boldface"; title.Font.Italic = false
How to implement JAVA:
WordDocument doc = new WordDocument (); DataRegion title = doc.createDataRegion ("PO_title", DataRegionInsertType.After, "[home]"); title.setValue ("text issued by so-and-so company\ n"); title.getFont (). SetBold (true); title.getFont (). SetSize (20); title.getFont (). SetName ("boldface"); title.getFont (). SetItalic (false)
Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.