Set the column order in document library using power shell

hi all,
 am looking for a power shell script which set the column order in the document  library, when i try to upload a  document.
 ie; i am  uploading a  doc to the doc lib. which has the below columns:
 columnA -   [choice field  - mandatory ]
 columnB -   [lookup field  - mandatory ]
 columnC -   [single line of text  - optional ]
 columnD -   [choice field  - optional ]
 columnE -   [choice field  - mandatory ]
now when  the end user uploads a   document in my doc lib, i would like to see the mandatory columns takes up the top order and then optional fields.
 columnA
 columnB
 columnE
 columnC
 columnD
so, is there any script, through which i can set the mandatory columns which will be coming in top and the optional fields as next order

This is sample PowerShell code to reorder fields in a content type of a list.
$web = Get-SPWeb http://aissp2013/sites/TestSite
$list = $web.Lists["MyList"]
$contentType = $list.ContentTypes | where {$_.Name –eq "MyTestCT"}
$ctArray = "Title","ColumnA","ColumnB","ColumnD","ColumnC"
$contentType.FieldLinks.Reorder($ctArray)
$contentType.Update()
Blog | SharePoint Learnings CodePlex Tools |
Export Version History To Excel |
Autocomplete Lookup Field

Similar Messages

  • How to create a 'Link to a Document' Item in a SharePoint Document Library using power shell?

    Hi,
    I have a document library with "Link to a document" content type. And, I have to add some links into that library using powershell. I have searched enough regarding approachs for adding a link into the library in powershell but i did not get anything yet.
    Please provide some approaches and code samples to solve this problem.
    Thanks,
    Lalit Kumar Mishra 

    Adding Site Columns To Content Types Using PowerShell
    Adding Site Columns To Content Types Using PowerShell
    The below PowerShell script will allow you to add a metadata field that is either contained at the Site Collection level, Site level, or library level, to the specified Content Type.
    It also contains some optional lines that you might choose to include or exclude, such as
    Setting the visibility of the column in the edit form to hidden
    Setting the status of the column to require values
    01
    function Add-SPContentTypeField
    02
    03
        <#
    04
            .Synopsis
    05
                This function will allow you to add a library field to a Content
    Type
    06
            .Description
    07
                This function will add the nominated site column/ library column to a nominated Content
    Type within all of the 'Document Libraries'
    in the given Site Collection
    08
            .Example
    09
                C:\PS>Add-SPContentTypeField
    –SiteUrl “http://yourdomain.com/sites/Finance –FieldName
    "myField" -CTypeAddedTo "myContentType"
    10
            .Notes
    11
                Name: Add-SPContentTypeField
    12
                Author: Petro Margaritis
    13
                Last Edit: 19/07/2012
    14
                Keywords: Fields, Site Columns, Content Types
    15
            .Link
    16
                http://thesharepointproject.com/
    17
        #>
    18
    19
        Param (
    20
               [parameter(Mandatory=$true)][string]$SiteUrl,
    21
               [parameter(Mandatory=$true)][string]$FieldName,
    22
               [parameter(Mandatory=$true)][string]$CTypeAddedTo
    23
    24
    25
        $site = Get-SPSite
    $SiteUrl
    26
    27
        # Walk through each site in the site collection
    28
        $site | Get-SPWeb
    -Limit all | ForEach-Object {
    29
    30
            write-host
    "Checking site:"$_.Title -Foregroundcolor
    Green
    31
    32
            # Go through each document library in the site
    33
            foreach
    ($list in $_.Lists | where
    { $_.BaseTemplate -eq "DocumentLibrary" })
    34
    35
    36
                # Check to see if the library contains the content type we are looking for
    37
                if (($list.ContentTypes |
    where { $_.Name -eq $CTypeAddedTo
    }) -eq $null)
    38
    39
                    Write-Host
    "The Content:" $CTypeAddedTo "does not exist in the library:"
    $list.Title -Foregroundcolor Red
    40
    41
                else
    42
    43
                    # Check to see if the library contains the field we are looking for
    44
                    if (($list.Fields |
    where { $_.Title -eq $FieldName
    }) -ne $null)
    45
    46
                        # Get the content type you want to add the field to
    47
                        $ct
    = $list.ContentTypes[$CTypeAddedTo]
    48
                        # Get the column you want to copy
    49
                        $field
    = $list.Fields[$FieldName]
    50
                        # Add the column to the content type
    51
                        $ct.Fieldlinks.Add($field)
    52
                        $ct.update()
    53
    54
                        # Add additional column settings
    55
                        $ctFieldLinks
    = $ct.FieldLinks | Where
    {$_.Name -eq $field.Title}
    56
                        # OPTIONAL: This will set the column to hidden so that it is not viewable in the edit form
    57
                        $ctFieldLinks.Hidden =
    $true
    58
                        # Set Field to require value
    59
                        $ctFieldLinks.Required =
    $true
    60
                        $ct.Update()
    61
                        Write-Host
    "The Field:" $field.Title "has been successfully added to the library:"
    $list.Title -Foregroundcolor Cyan
    62
    63
                    else
    64
    65
                        Write-Host
    "The Field:" $FieldName "does not exist in the library:"
    $list.Title -Foregroundcolor Yellow
    66
    67
    68
    69
    70
        # Dispose of the site object
    71
        $site.Dispose()
    72
    Simply copy and paste the above into Notepad and save it as a PowerShell file with the name
    Add-SPContentTypeField.ps1
    view sourceprint?
    1
    # To run the above function you'll need to do the following - go into the saved location
    2
    Cd C:\scripts\
    3
    # Then call it using the dot prefix - note that there is a space between the dots, ..\
    4
    . .\Add-SPContentTypeField.ps1
    5
    # Now we can happily run the script like so
    6
    Add-SPContentTypeField –SiteUrl “http://yourdomain.com/sites/Finance –FieldName
    "myField" -CTypeAddedTo "myContentType"

  • How to set the column order of a sealed column in a custom Content Type for the new item form NewDocSet.aspx?

    Dear SharePoint Developers,
    Please help.
    I need to know How to set the column order of a sealed column in a custom Content Type for the new item form NewDocSet.aspx?
    I think this is a "sealed column", whatever that is, which is  shown in SPD 2013 as a column of content type "document, folder, MyCustomContentType".
    I know when I set the column order in my custom Content Type settings page, it is correct.
    But, when I load the NewDocSet.aspx page, the column order that I set in the settings page is NOT used for this "sealed column" which is bad.
    Can you help?
    Please advise.
    Thanks.
    Mark Kamoski
    -- Mark Kamoski

    Hi,
    According to your post, my understanding is that you want to set the column order of a sealed column in a custom Content Type for the new item form NewDocSet.aspx.
    Per my knowledge, if you have Content Type management enabled for the list or library (if you see a list of content type with the option to add more), the display order of columns is set for each content type.
    Drill down into one of them and you'll see the option under the list of columns for that content type.
    To apply the column order in the NewDocSet.aspx page, you need to:
    Select Site Settings, under Site Collection Administration, click Content type publishing. In the Refresh All Published
    Content Types section, choose Refresh all published content types on next
    update.
    Run two timer jobs(Content Type Hub, Content Type Subscriber) in central admin(Central Administration--> Monitoring--> Review timer jobs).
    More information:
    http://sharepoint.stackexchange.com/questions/95028/content-types-not-refreshing-on-sp-online
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • Get/retreive managed metadata column value from Document Library using SharePoint 2013 JSOM

    Hi,
    I am trying to retrieve managed metadata column (NewsCategory) value in SharePoint 2013 Document library using JSOM.
    I get "Object Object" rather than actual value.
    I tried:-
    var newsCat = item.get_item('NewsCategory');
    alert(newsCat) //Displays [Object Object]
    var newsCatLabel = newsCat.get_label();
    var newsCatId = newsCat.get_termGuid();
    But, I get the error "Object doesn't support property or method get_label()"
    I also tried :-
    var newsTags = item.get_item(' NewsCategory ');
    for (var i = 0; i < newsTags.get_count() ; i++) {
    var newsTag = newsTags.getItemAtIndex(i);
    var newsTagLabel = newsTag.get_label();
    var newsTagId = newsTag.get_termGuid();
    Even now I get the error "Object doesn't support property or method get_count()"
    I have included " NewsCategory " in the load request:- context.load(items, 'Include(File, NewsCategory)');
    Any idea what the issue is? Do I have to add any *.js file using $.getScript?
    I added following .js files
    var scriptbase = _spPageContextInfo.webServerRelativeUrl + "/_layouts/15/";
    $.getScript(scriptbase + "SP.Runtime.js", function () {
    $.getScript(scriptbase + "SP.js", function () {
    $.getScript(scriptbase + "SP.Core.js", function () {
    Thanks in Advance,

    Hi Patrick,
    I already added those references. I just pasted the parts of script snippet in my initial post. To avoid confusion I am pasting here complete script.
    2.1.1.min.js"></script>
    <script type="text/javascript">
    $(document).ready(function(){
    var scriptbase = _spPageContextInfo.webServerRelativeUrl + "/_layouts/15/";
    $.getScript(scriptbase + "SP.Runtime.js", function () {
    $.getScript(scriptbase + "SP.js", function () {
    $.getScript(scriptbase + "SP.Core.js", function () {
    function getdata() {
    var context = new SP.ClientContext.get_current();
    var web = context.get_web();
    var list = web.get_lists().getByTitle('Documents');
    var camlQuery = new SP.CamlQuery();
    var filterCategory = 'Solutions';
    var IDfromTaxonomyHiddenList = 15;
    camlQuery.set_viewXml('<View><Query><Where><Eq><FieldRef LookupId="TRUE" Name="'+filterCategory+'" /><Value Type="ID">' + IDfromTaxonomyHiddenList +'</Value></Eq></Where></Query></View>');
    /*the above CAML query successfully gets all the list items matching the criteria including "NewsCategory" managed metadata column values
    But when I try to display the value it retrieved it ouputs/emits Object Object rather than actual values */
    var items = list.getItems(camlQuery);
    context.load(items, 'Include(File,NewsCategory)');
    context.executeQueryAsync(
    Function.createDelegate(this, function (sender, args) {
    if (items.get_count() > 0) {
    var listItemEnumerator = items.getEnumerator();
    while (listItemEnumerator.moveNext()) {
    var oListItem = listItemEnumerator.get_current();
    var file = oListItem.get_file();
    var name = file.get_name();
    var newsCat = oListItem.get_item('NewsCategory'); alert(newsTags.constructor.getName());
    alert(newsCat) //Displays [Object Object]
    var newsCatLabel = newsCat.get_label(); // Here it errors out with message "Object doesn't support property or method get_label()"
    var newsCatId = newsCat.get_termGuid();
    } //end while
    }//end if
    Function.createDelegate(this, function (sender, args) {
    alert('Request failed. ' + args.get_message() + '\n' + args.get_stackTrace());
    ExecuteOrDelayUntilScriptLoaded(getdata, "SP.Core.js");
    </script>
    In the above script "var name = file.get_name(); " gets the exact file name.
    But the line "var newsCat = item.get_item('NewsCategory');
           alert(newsCat) //Displays [Object Object]  rather than actual value.
    Issue resolved replace "oListItem.get_item('NewsCategory');" with oListItem.get_item('NewsCategory').get_label();"
    Thanks

  • How to get and set the column order in SharePoint list forms

    Hi,
    I want to read the column order of the SharePoint list forms in SharePoint 2003 sites using any of the available web services and need to set the same order
    in the newly created list in SharePoint 2010.
    I am able to read the fields from SharePoint 2003 and creating the list with same fields in SharePoint 2010, but the column order is not maintaining in
    list forms.
    Also, I need to created the views from 2003 site to 2010 site.
    Please help me...
    Thanks in advance...

    Hi,
    Please try to use the following code to programatically change the order.
    SPList list = web.Lists["Example List"];
    if (list.ContentTypes.Count > 0)
    SPContentType ct = list.ContentTypes[0];
    string[] names = {"Example_x0020_One", "Example_x0020_Two", "Example_x0020_Three"};
    ct.FieldLinks.Reorder(names);
    ct.Update();
    Here is a similar thread for your reference:
    https://social.technet.microsoft.com/Forums/en-US/ce66fd65-2882-4bda-8142-89e116d8b90f/how-to-set-the-order-of-the-fields-in-list-forms?forum=sharepointdevelopmentprevious
    Best Regards
    Dennis Guo
    TechNet Community Support

  • How to change the column order in OVS - NOT USING Enhancement Pack 1

    Hi Guys,
    we are currently using NWDS 7.1.
    I cannot seem to chang the order of the columns when the OVS pops up.  We have tried to change the order of the fileds of the custom SAP BAPI that is used for this OVS but no success.
    Please advise on possible changes of the actual BAPI that might help, or things we can do Java side.
    Kind Regards,
    Christiaan

    Hi Christiaan,
    This can be done from Java side in itself.
    This depends on the order in which you add attributes to the node in the context for ovs output.Recreate the context node of ovs output and add attributes one after the other in the same order you want it to appear in the ovs pop - up.That simple.
    Hope this helps.
    Regards,
    Ashok

  • How to update managed metadata column for all file in document library using powershell

    Hi,
    How to update managed metadata column for all file in document library using powershell?
    Any help on it.
    Thanks & REgards
    Poomani Sankaran

    Hi TanPart,
    I have changed the code which you have give in order to get the files from SharePoint 2010 Foundation  Document Library.But i am getting below error in powershell.
    Property 'ListItemCollectionPosition' cannot be found on this object; make sure it exists and is settable.
    Could you tell me which is the issues in it?
    See the code below.
    $web = Get-SPWeb http://ntmoss2010:9090/Site
    $list = $web.Lists["DocLib"]
    $query = New-Object Microsoft.SharePoint.SPQuery
    $query.ViewAttributes = "Scope='Recursive'";
    $query.RowLimit = 2000
    $caml = '<Where><Contains><FieldRef Name="Title" /><Value Type="Text">Process Documents/Delivery</Value></Contains></Where>' +
            '<OrderBy Override="TRUE"><FieldRef Name="ID"/></OrderBy>'
    $query.Query = $caml
    do
        $listItems = $list.GetItems($query)
        $spQuery.ListItemCollectionPosition = $listItems.ListItemCollectionPosition
        foreach($item in $listItems)
            #Cast to SPListItem to avoid ambiguous overload error
            $spItem = [Microsoft.SharePoint.SPListItem]$item;
            Write-Host $spItem.Title       
    while ($spQuery.ListItemCollectionPosition -ne $null)
    Thanks & Regards
    Poomani Sankaran

  • I created a Pages document inserting 2 columns using 1) Inspector 2) Layout 3) columns.  How do I decrease the height of the column.  Have tried to use cursor and drag down the top border, but that does not reset the top border.

    I created a Pages document inserting 2 columns using 1) Inspector 2) Layout 3) columns.  How do I decrease the height of the column.  Have tried to use the cursor and drag down the top border, but that does not reset/decrease the top border.

    Set your columns back to one for the moment. In layout mode, insert a Text box. Place it in the upper left corner of your document, and drag down and right to the size of the container for your two columns. Click inside the Text Box, and now bump up your columns to 2. Your two columns are now contained in this resizable Text Box.

  • Using MS Access Web App, can you set the tab order of the fields on a form?

    Using MS Access Web App, can you set the tab order of the fields on a form?  Doesn't appear to be a property.  I don't see a programmatic method.  I saw someone suggest using goto control on the after update event trigger but what if the person
    doesn't edit the field?  No event would be fired.
    Jim

    Hi Jim,
    >>Using MS Access Web App, can you set the tab order of the fields on a form?
    I am afraid you could not. In Web applications, the tab order is set automatically and cannot be changed.
    (From
    https://support.office.com/en-au/article/Set-the-tab-order-for-controls-3d7f749c-5a53-42b2-bb0e-2323fa044e2e)
    >> I saw someone suggest using goto control on the after update event trigger but what if the person doesn't edit the field?  No event would be fired.
    The goto method is a workaround, but it should be triggered by a specific event. What I can figure out is changing the order of the fields.
    If this is a feature you want to include in future versions of Access Web app, please submit a feedback as the picture below:
    Best Regards,
    Edward
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Can't change column order from document content type

    Hi,
    I noticed a strange error in our SharePoint 2010 environment:
    We are using a SharePoint 2010 Enterprise Edition which was migrated from a MOSS 2007 Enterprise Edition with one central document library.
    In this library are several content types plus the given document content type which was already there.
    When I try to edit the column order in the document content type settings the following error occurs:
    Server Error in '/' Application.
    Object reference not set to an instance of an object.
    Description:
    An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and
    where it originated in the code.
    Exception Details:
    System.NullReferenceException: Object reference not set to an instance of an object.
    Source Error:
    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location
    of the exception can be identified using the exception stack trace below.
    Stack Trace:
    [NullReferenceException: Object reference not set to an instance of an object.]
    Microsoft.SharePoint.ApplicationPages.ChangeFieldOrderPage.OnLoad(EventArgs e) +376
    System.Web.UI.Control.LoadRecursive() +65
    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2427
    This error only occurs with the document content type. Furthermore I am not able to reproduce this error on other libraries except when
    I am using a template from this library.
    I tried to delete this content type but every time an error occurs which is saying that the content type is still in use. I checked the entire library and all informations from the SharePoint Manager 2010 Tool but the content type is definitely no longer in
    use.
    I appreciate every little bit of help regarding this problem.
    PS:
     There is also another error concerning every content type in this library: I can’t create a new or use the standard Microsoft document information panel template because every time I try to there also occurs an error which
    states out a NullReferenceException regarding the metadata of this library. But that is another story which is next on my to-do list. First I would like to solve the first error concerning the column order.
    Thanks and regards,
    Thomas K.

    Hi TKellner,
    Thanks for your post.
    1.      
    Please try to use the code below to check whether the Content Type is in used.
    http://www.learningsharepoint.com/forum/sharepoint-2007-programming/check-where-the-content-type-is-used-in-sharepoint-site/
    2.      
    Can you open the Document Library in SharePoint Designer 2010? Also, can you open the template file correctly?
    Share the result.

  • Set relation between list and document library?

    I have a requirement that I want to show pop up/ modal dialog when I click on list item column "upload/Edit" (in EditForm.aspx) . In Modal Dialog I have to show upload button and also existed items if any. Here the attachments will store into document
    library's folder .The list item ID should be the folder name in document library.
    How do I set relation between list and doc lib ?
    Appreciate if suggests any links.
    Thank you.

    Hi Saurav,
    pls check below
    What version of SharePoint 2010 "SP 2010 Foundation or SP 2010 Server" you need to have SP 2010 server and to have the "User Profile service application".
    How do you configure the "User Profile service application" did you add the "Social Tagging Database"
    Create, edit, or delete a User Profile service application (SharePoint Server 2010)" 
    http://technet.microsoft.com/en-us/library/ee721052.aspx
    When you access to "Application Management>Manage service applications>User Profile Service Application>Manage User Permissions" validate if the all authenticated users Group have the "use Social Features" checked.
    Also validate in Central Administration in Farm Features if you have social tags and notes activated.
    http://sharepoint.stackexchange.com/questions/17546/tagging-feature-not-working
    https://social.technet.microsoft.com/Forums/office/en-US/c11cda96-091b-4b96-91bc-ccd8000238f4/tags-and-notes-sharepoint-2010-not-visible?forum=sharepointadminprevious
    Please remember to click 'Mark as Answer' on the answer if it helps you

  • Sharepoint 2010 - Archiving the files from one document library to another document library in sharepoint site

    I have a requirement to move the documents from one document library to another document library.
    Source Library - DocumentLib
    Destination Library - Archive
    Archive document library will have folders by fiscal year.
    Source documentlibrary has files from year 2012 till date.
    Archive folder will have folders by fiscal year -(fiscal year starts from July1st -June 30th )
    If the document is created date  between 1st  July 2012 -June 2013 then move the document to Archive document library and in  folder Fiscal Year 2013.
    If the document is created date  between 1st  July 2013 -June 2014 then move the document to Archive document library and in  folder Fiscal Year 2014.
    The structure of destination document library folder should be same as source document library.
    Please find attached the screenshot of the requirement.
    Files Type - Excel,pdf,microsoft outlook item
    Could we use Sharepoint designer workflow to achive this task?
    Any help on this will be appreaciated.

    Hi Asritha,
    According to your description, you want to create a workflow to meet the need.
    Per my knowledge, there is no built-in action which can move the documents from the current library to a folder in another library.
    I recommend to use the custom activity 'Copy List Item Extended' which need to be downloaded from
    http://spdactivities.codeplex.com/.
    Please per the steps below to deploy the custom activity to SharePoint:
    Download the activity form http://spdactivities.codeplex.com/
    Open Dos command prompt.
    Browse to the directory that you can access stsadm.exe. The default location in version 3.0 is C:\Program Files\Common Files\Microsoft Shared\web server extensions\14\bin
    Type the stsadm commands: stsadm -o addsolution -filename C:\UsefulSPDWorkflowActivities_0.5.0\DP.Sharepoint.Workflow.wsp (“C:\UsefulSPDWorkflowActivities_0.5.0\” is the file path)
    Type the stsadm commands: stsadm -o deploysolution -name DP.Sharepoint.Workflow.wsp -allowgacdeployment -force -immediate 
    Open the Center Administration, Click System Setting->Manage Farm Solution-> dp.sharepoint.workflow.wsp->Deploy to the Web Application.
    After that, we can create a workflow to meet the need.
    Here is the detailed steps to create the workflow:
    Create a workflow associated with the Source Library DocumentLib and set the workflow to start when an item is created.
    Select If current item field equals value, change the settings to be If Current Item: Created is greater than 7/1/2012.
    Select If current item field equals value, change the settings to be If Current Item: Created is less than 6/30/2013.
    Select Copy List Item Extended, change the settings to be Copy item in Current Item to list at Fiscal Year 2013 folder url.
    Select Delete Item, change the settings to be Delete Item in Current Item.
    Select If current item field equals value, change the settings to be If Current Item: Created is greater than 7/1/2013.
    Select If current item field equals value, change the settings to be If Current Item: Created is less than 6/30/2014.
    Select Copy List Item Extended, change the settings to be Copy item in Current Item to list at Fiscal Year 2014 folder url.
    Select Delete Item, change the settings to be Delete Item in Current Item.
    Publish the workflow.
    Best regards.
    Thanks

  • Query a document library using Search Rest API

    How can we search for a specific document library using SharePoint Search through Rest API? We have a couple of document libraries which have thousands of documents with its relevant metadata information stored. We need to create an app to search through
    these document libraries and display the document and its metadata. Can someone point me in the right direction?
    V

    Taking what Shakir said you would substitute queryText with a managed property query (KQL) to query against metadata from the Document library. So if your document library has a Owner column then you would either create or use an existing managed property
    defined in the Search Schema. So your query may look like this:
    https://<site URL>/_api/search/query?querytext='(owner:smith)+AND+(path:<library url>)'
    Link:
    https://msdn.microsoft.com/en-us/library/office/ee558911.aspx?f=255&MSPPError=-2147217396
    Blog | SharePoint Field Notes Dev Tools |
    SPFastDeploy | SPRemoteAPIExplorer

  • Is it possible to get Exchange emails downloaded to SharePoint document library using Powershell and or Custom Workflow?

    I have been asked to see if it would be possible to get  exchange emails downloaded and or sent to a document library .
    I know of the sitemail box app. but we are not running Exchange 2013.
    and setting up the lists and or document library to receive emails using the built in doesn't seem to be working...( maybe not configured correctly, i would need to see what the prior admin/developer did)
    But is there a way to get the emails downloaded to a document library using a workflow and or a powershell script that is triggered via  workflow?

    Hi,
    Since workflow can only work on items in SharePoint sites, they cannot get Exchange emails, let alone download emails to SharePoint library. However, you could manually save email to local and upload it to SharePoint list/library.
    I'd suggest you toubleshooting the incoming email settings in SharePoint. Please refer to the article below and check your configuration:
    https://technet.microsoft.com/en-us/library/cc262947.aspx
    http://blogs.technet.com/b/harmeetw/archive/2012/12/29/sharepoint-2013-configure-incoming-emails-with-exchange-server-2013.aspx
    Regards,
    Rebecca Tu
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • How to open and read Excel Sheet from SharePoint 2013 Document Library using C# Visual Studio 2012

    Hi,
    To achieve these are the steps that I had followed :
    1. Add the document Library path into Central Admin -> Application Mgmt -> Manage Service App -> Excel Service App -> Trusted File Locations
    2. Add Documnet Library link to Trusted Connection Proivder
    3. Open Visual Studio as Run as Administrator
    4.Create an SharePoint 2013 Empty Project.
    5.Add Service Reference : http:\\<server>\_vti_bin/excelservice.asmx
    6.Service added successfully
    7.Create a class file and add the Service Reference namespace
    There is no such class as ExcelService to call. 
    Please let me know if somebody knows how to open the Excel file into C#(2012)  either using ExcelService or any other way to open. I tried old methods of Sharepoint 2010 server but it's not able to access classes.
    Requirement is :
    Need to read the excel sheet  from Document Library and transfer all data into DataTable.
    Please help asap. 

    Hi,
    This is the forum to discuss questions and feedback for Microsoft Office, I'll move your question to the SharePoint 2013 development forum
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/home?forum=sharepointdevelopment
    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.
    George Zhao
    TechNet Community Support

Maybe you are looking for

  • How do I prevent website from scrolling horizontally in Dreamweaver?

    I have created a website that (although I'm not seeing scrolling on my computer and 2 others across multiple browsers) has a horizontal scroll bar when my client views on her computer. I am having problems troubleshooting since I can't see the proble

  • HT204380 FaceTime Activation An error occurred during activation

    Trying to log into FaceTime on a new iPod Touch. When I enter my apple id and pass, I get the following error message. "FaceTime Activation...An error occurred during activation. Try Again." I know the apple id and pass are correct, any suggestions.

  • How good is the iphone or 3gs model

    I just want to know your idea on the iphone if i should buy it or not. i would like to get the 16g 3gs thanks

  • Issue during delete obsolete

    Hi, I have 10.2.0.4 database on AIX and taking the backup using RMAN. While running Delete obsolete command, it is giving below message at last: DELETE OBSOLETE; Deleted 198 objects For record type DELETED OBJECT recids from 522 to 523 are re-used be

  • InDesign CC 2014 Update failure

    |  - 0 fatal error(s), 6 error(s) 02/24/15 13:31:39:940 | [INFO] |  | OOBE | DE |  |  |  | 16191 | OSX version: 10.10.2  02/24/15 13:31:39:940 | [INFO] |  | OOBE | DE |  |  |  | 16191 | 02/24/15 13:31:39:940 | [INFO] |  | OOBE | DE |  |  |  | 16191 |