Replacement for BuiltInDocumentProperties, When upgrading .Net project's Aspose Cells from 4.7.1.0 to 8.4.0? - cells

I just tried to set a new reference for DLL Aspose cells 8.4.0. And i see so much error, since the properties or objects that is not supported in new version of aspose cells.
- Aspose.Cells.Rows
-Aspose.Cells.Columns
-Aspose.Cells.Comments
-Aspose.Cells.BuiltInDocumentProperties
-Aspose.Cells.Validations
-Aspose.Cells.Styles
-Aspose.Cells.Worksheets
And i found some replacement of the above in the new 8.4.0. aspose cells;
-Aspose.Cells.Row
-Aspose.Cells.Column
-Aspose.Cells.Comment
-________
-Aspose.Cells.Validation
-Aspose.Cells.Style
-Aspose.Cells.Worksheet
I have changes these much properties now, But did not find any for BuiltInDocumentProperties.
What can be the replacement for this.? Can someone please help on this .?

It is in Aspose.Cells.Properties namespace.
Aspose.Cells.Workbook workbook = new Workbook();
// Get reference to property collection
Aspose.Cells.Properties.BuiltInDocumentPropertyCollection properties = workbook.BuiltInDocumentProperties;
// Get individual properties
String author = properties.Author;
String company = properties.Company;
I work for Aspose as Developer Evangelist.

Related

MS Project - VBA - Changing resource type

Sorry if the question has been answered but I looked a bit on the site and it has helped in many ways already !
I was asked to do in VBA some programming to transfer data into MS Project.
I managed to do it all except for one thing, when I create a resource, Project automatically describes it as a Work Type and some of mine are actually Material Type.
I then thought of changing it after creating the resource and assign it to a task
My bit of problematic code is the following
Set NR = .Resources.Add(name:=tmpTxt)
.Resources(k).Type = pjResourceTypeMaterial
.Resources(k).Assignments.Add TaskID:=j
When I run it I don't have any error message, but in the resource view on MS Project the Type hasn't changed...
I would be very grateful if any of you can help me !
Is there some code you haven't included in your extract that associates NR with .Resources(k)? It looks like you have created a new material resource and tried to set the resource type of some other existing resource to "Material". Can you please include the with . . . end with construct?
Without seeing more of the problem I'm not completely sure what you are having trouble with but assuming you are referencing the ActiveProject all you need to do to create a new Material type resource is:
Set NR = Activeproject.Resources.Add (name := "A New Resource")
NR.Type = pjResourceTypeMaterial

FastReports: Adding Objects to other than OverlayBand

I am writing a FastReport from code (not using the designer), the report eventually to be exported to a file.
If I export the report created from code to a .fpx - a report preview file, the file's bands do not appear when opened in "Edit Page" mode via the designer (though the bands' contents - e.g. data - does). The report is rendered, correctly - the content is where it needs to be. The only band that is present is the OverlayBand - not explicitly created by me in the code.
If I add band objects through code - for instance, a DataBand object - how do I ensure the added objects are: [1] added to the report, itself; and [2] not absorbed (?) by - or, added to - the OverlayBand object.
I consulted the scant documentation and have not found an answer. I am not looking for you to code the report for me. My thought is that I am missing a critical piece of the creation-from-code puzzle, e.g. the addition of further layers (not bands) to the report page.
Currently, I am instantiating a report:
Dim rptReport As New Report
Dim rptPage As New ReportPage
rptReport.Pages.Add(prtPage)
Further objects are then added to the the rptPage.Bands using:
' Pseudo-code:
rptPage.Bands.Add(aBandObject)
Must I explicitly add layers to the page before I can begin adding bands to it? My thought is that there is code that must enable the addition of bands to layers other than the overlay band, i.e.:
Dim rptReport As New Report
Dim rptPage As New ReportPage
rptReport.Pages.Add(prtPage)
' CODE INSERTED HERE: rptPage.Objects.Add(Bands) (Pseudo-code)
Again, if you are able to point in the right direction, I am okay with that; however, I have consulted the forums and documentation and am unable to find an answer - hence my asking, here.
From what I can see, the issue does not appear to arise from the code.
When saved as a .fpx file and then opened in "Edit Mode", it remains true that the bands disappear; however, if I run rptObject.Design() and open the report that way, the bands appear as they should.
The problem appears to arise from saving the file as a .fpx, the "preview" file (as opposed to .frx)

TextControl Images/Watermarks

In version 18 of TextControl (http://www.textcontrol.com) there is supposed to be the ability to add background images/watermarks to the document, however I find that the behavior of the various overloads, etc is not working correctly and that the documentation is rather scarce on examples. Does any one have a working example of adding watermarks to a Word document through the ServerTextControl object?
This functionality didn't exist in previous versions, so I recognize it's still rather new, I just find it weird that doing something like
tx.Images.Add(draftImage, pageNumber, location, ImageInsertionMode.BelowTheText);
doesn't actually add the images to the document, but if I use another overload beforehand, it adds both?
I just need a loop along the lines of
foreach (TXTextControl.Page page in pages){
page.Select();
var location = tx.InputPosition.Location;
var pageNumber = page.Number;
tx.Images.Add(draftImage, pageNumber, location, ImageInsertionMode.BelowTheText);
}
where location is supposed to be the beginning of the page.
Any help would be appreciated, this should be simple!
Thank you
Finally got a response to this on their forum, it's not a complete solution, but it works for the most part. Figured I would follow up here, so that anyone who ends up on this page would get the help I wanted.
http://forums.textcontrol.com/showthread.php?325522-Watermarking-Background-Image-on-Saved-Documents-in-X8&p=41815#post41815

Get Page URL using Sitefinity 4 Fluent API

Okay, this seems like a pretty simple thing to do. But I'm trying to use the Sitefinity 4 Fluent API to query for a page and populate the Text/NavigationUrl properties of a HyperLink. The text gets populated fine - but it has a hard time getting the Url from the page.
PageNode page = App.WorkWith().Page(PageId).Get();
PageLink.Text = page.Title;
PageLink.NavigateUrl = page.Urls.Where<PageUrlData>(pU => pU.RedirectToDefault == false).FirstOrDefault<PageUrlData>().Url;
The first and second line work fine (PageLink.Text shows the page title). On the third line, I get an "Object reference not set to an instance of an object." error... FYI PageId is a Guid reference to a page.
Any help would be greatly appreciated.
Found the issue. PageNode requires "Telerik.Sitefinity.Pages.Model" as a reference. I had that, but later found that you ALSO need to include "Telerik.Sitefinity.Modules.Pages".
This adds a new method to my belt which I've used below (getFullUrl):
PageNode page = App.WorkWith().Page(PageId).Get();
PageLink.Text = page.Title;
PageLink.NavigateUrl = page.GetFullUrl();
Thanks

How do you move a SharePoint 2010 DocumentSet from one list to another?

I've tried many variations.
Send To Library - That creates a Zipped file in the Drop Off Library, then it doesn't route via the rules in Content Organizer
API - I've tried to do an Export, Import, but always receive the same error. This is per this MSDN documentation: http://msdn.microsoft.com/en-us/library/microsoft.office.documentmanagement.documentsets.documentset.create.aspx
Sample snippet:
byte[] exportedFile = set.Export();
DocumentSet.Import(exportedFile, DocSetNameToCreate, targetFolder, dsCt.Id, properties, web.CurrentUser);
Error Received:
DocID: Site prefix not set.
Finally got it to run. This is related to the Document ID Feature. Make sure it is activated in each site. Let is run over night (timer jobs need to run). Then the content organizer will successfully move and unpackage your document sets.
You don't have to activate the document id feature, just ensure that in the property bag of the root web of the destination site collection (where the document set will be imported again) exists a property named "docid_msft_hier_siteprefix" with an value of "" (empty string).
Use this powershell-script:
$site = Get-SPSite http://host/sites/yoursite
$properties = $site.RootWeb.Properties
if ($properties["docid_msft_hier_siteprefix"] -eq $null)
{
$properties["docid_msft_hier_siteprefix"] = ""
$properties.Update()
}
Note that i use the old property bag RootWeb.Properties instead of the new hashtable RootWeb.AllProperties, thats because the class Microsoft.Office.DocumentManagement.Internal.OobProvider still uses that.
So why is it failing when a document set is imported? The function DocumentSet.ImportProperties() catches an ArgumentException while trying to set the document id of the document set list item (so there's no problem if the document id column doesn't exist yet).
But they missed that the function OobProvider.GetSitePrefix() which is called through the function OobProvider.GenerateDocumentId() throws an InvalidOperationException if the property bag doesn't contain the prefix property.