Friday, August 19, 2016

Cannot open xslx file: workbook is larger than the maximum workbook size allowed to be opened in the browser

Error msg: This workbook is larger than the maximum workbook size allowed to be opened in the browser


Resolution
Set the default behavior for browser-enabled documents on this document library to "open in the client application". This will replicate the same behavior as in SharePoint 2007.


For more details:
Since the WB web app will be on shared infrastructure, adjusting the default workbook size limit is not recommended as the change will affect every tenant on the farm and this could lead to performance issues over time. In fact, the workbook size limit is actually not the problem. Please see the below for an explanation of the problem and the recommended solution.

First, you are not seeing this problem in SharePoint 2007 for the following reasons:
1           1)      The document library in question is not defined in the Excel Services Trusted File Locations                 - which would have imposed the 10 MB limitation (there are several other document                           libraries in WB that are defined in trusted file locations)
2          2)      More importantly, Excel documents in a document library not in a trusted file location default              to opening in Microsoft Excel (the client application)           

In SharePoint 2010, you are seeing this problem due to the combination of the following:
1)      By default, Trusted File Locations for Excel Services is allowed for the entire farm (as opposed to individual document libraries) and the workbook size limit is 10 MB.
2)      Microsoft modified the behavior of opening documents in the browser by adding an "open in the browser" option and making it the default for all document libraries

As such, the recommended solution for this is to set the default behavior for browser-enabled documents on this document library to "open in the client application". This will replicate the exact same behavior you are currently seeing in SharePoint 2007.

The above setting is available per document library - if you encounter this problem elsewhere in WB, it would have to be set accordingly.  If you want to override this setting at the site collection level – this can be done by activating a site collection feature. However, this should be discussed among your group to ensure it will align with all tenants in WB before you go this route.

If you do allow the opening in the browser option, please be advised that Excel workbooks have to be under 10 MB. You should also reference this article to be aware of the differences for using an Excel workbook in the browser and in Excel.

Monday, April 25, 2016

SharePoint PowerShell: Get list of all users present in a site under different SharePoint Groups

$site = Get-SPSite <Provide Site Collection URL here>
$web = $site.OpenWeb()
$groups = $web.sitegroups
 
foreach ($grp in $groups) {
    "Group: " + $grp.name;
    $groupName = $grp.name
    write-host "Group: " $groupName   -foregroundcolor green
    foreach ($user in $grp.users) {
            "User: " + $user.name
            write-host "User " $user.UserLogin   -foregroundcolor red
    }
}

Script to get list of sites and subsites

Get-SPWebApplication http://site | Get-SPSite -Limit All | Get-SPWeb -Limit All | Select Title, URL, ID, ParentWebID | Export-CSV C:\InfoArch.csv -NoTypeInformation

source

Friday, January 15, 2016

cygwin does not recognize crul command

You need to download cygwin package
the following extracted from

http://stackoverflow.com/questions/3647569/how-do-i-install-curl-on-cygwin

1) Find the cygwin setup.exe file from http://cygwin.com/ and run it. 
2) Click/enter preferences until you reach the "Select Packages" window. (See image) 
3) Click (+) for Net 
4) Click the entry for curl. (Make sure you select the checkbox for the Binary) 
5) Install. 
6) Open a cygwin window and type curl.exe (should be available now).

OR
Run setup-x86.exe -q -P curl in windows cmd window.

List of tools/utilities

1. Unix emulator
         cygwin

2. Notepad ++

3. Textpad