Add data to excel which is already in document library

hi im new to sp2013,
i need to add/fill data to the excel sheet-1 , i.e, which is already in the sharepoint document library and that too in sheet-1 only because, i had a macro on excel which is on doc lib, so i need to fetch data from list and to fill data to sheet-1 programatically
or OOTB.
thanks in advance

The OOB way uses a data connection to retain link to a live SharePoint list.  You could possibly try exporting this data connection file (via the Data --> Data Connections dialog box) and importing that within your Report.XSLX
If that's not sufficient, I imagine you'd need to create something with a VBA Macro.
Steven Andrews
SharePoint Business Analyst: LiveNation Entertainment
Blog: baron72.wordpress.com
Twitter: Follow @backpackerd00d
My Wiki Articles:
CodePlex Corner Series
Please remember to mark your question as "answered" if this solves (or helps) your problem.

Similar Messages

  • How can i export the data to excel which has 2 tables with same number of columns & column names?

    Hi everyone, again landed up with a problem.
    After trying a lot to do it myself, finally decided to post here..
    I have created a form in form builder 6i, in which on clicking a button the data gets exported to excel sheet.
    It is working fine with a single table. The problem now is that i am unable to do the same with 2 tables.
    Because both the tables have same number of columns & column names.
    Below are 2 tables with column names:
    Table-1 (MONTHLY_PART_1)
    Table-2 (MONTHLY_PART_2)
    SL_NO
    SL_NO
    COMP
    COMP
    DUE_DATE
    DUE_DATE
    U-1
    U-1
    U-2
    U-2
    U-4
    U-4
    U-20
    U-20
    U-25
    U-25
    Since both the tables have same column names, I'm getting the following error :
    Error 402 at line 103, column 4
      alias required in SELECT list of cursor to avoid duplicate column names.
    So How can i export the data to excel which has 2 tables with same number of columns & column names?
    Should i paste the code? Should i post this query in 'SQL and PL/SQL' Forum?
    Help me with this please.
    Thank You.

    You'll have to *alias* your columns, not prefix it with the table names:
    $[CHE_TEST@asterix1_impl] r
      1  declare
      2    cursor cData is
      3      with data as (
      4        select 1 id, 'test1' val1, 'a' val2 from dual
      5        union all
      6        select 1 id, '1test' val1, 'b' val2 from dual
      7        union all
      8        select 2 id, 'test2' val1, 'a' val2 from dual
      9        union all
    10        select 2 id, '2test' val1, 'b' val2 from dual
    11      )
    12      select a.id, b.id, a.val1, b.val1, a.val2, b.val2
    13      from data a, data b
    14      where a.id = b.id
    15      and a.val2 = 'a'
    16      and b.val2 = 'b';
    17  begin
    18    for rData in cData loop
    19      null;
    20    end loop;
    21* end;
      for rData in cData loop
    ERROR at line 18:
    ORA-06550: line 18, column 3:
    PLS-00402: alias required in SELECT list of cursor to avoid duplicate column names
    ORA-06550: line 18, column 3:
    PL/SQL: Statement ignored
    $[CHE_TEST@asterix1_impl] r
      1  declare
      2    cursor cData is
      3      with data as (
      4        select 1 id, 'test1' val1, 'a' val2 from dual
      5        union all
      6        select 1 id, '1test' val1, 'b' val2 from dual
      7        union all
      8        select 2 id, 'test2' val1, 'a' val2 from dual
      9        union all
    10        select 2 id, '2test' val1, 'b' val2 from dual
    11      )
    12      select a.id a_id, b.id b_id, a.val1 a_val1, b.val1 b_val1, a.val2 a_val2, b.val2 b_val2
    13      from data a, data b
    14      where a.id = b.id
    15      and a.val2 = 'a'
    16      and b.val2 = 'b';
    17  begin
    18    for rData in cData loop
    19      null;
    20    end loop;
    21* end;
    PL/SQL procedure successfully completed.
    cheers

  • New MacBook pro how do I add external hard drive which has my entire iTunes library on it. Do I just drag external drive icon into iTunes preference box that shows where new itunes library is now located ie. On the MacBook pro.

    how do I add external hard drive which contains my entire iTunes library to new MacBook Pro. i want to keep iTunes library on external hard drive. But I want all my iTunes information:  artist, songs, albums, playlists on my new MacBook Pro.  I know about going to iTunes preferences- advanced-itunes media folder location.  At this point I don't know what to do   Do I drag external icon into iTunes media folder location box. I want to keep music files on external hard drive. I don't want to use macbook pro memory for my very large music files.

    I will request that your query be relocated to the iPhoto forum where knowledgeable iPhoto users will be able to assist you.
    Ciao.

  • To add data in excel file

    I have an excel file with some cells blank. I want to add data in these cells and save this excel file with a different name.How can I do these by repoer generation toolkit for microsoft office.I am using Labview 2011.
    Please give suggestions.
    Thank you in advance....................

    There are two parts to this problem -- How do you find blank cells in an Excel WorkSheet and fill them with predetermined values, and once you know how to do that, how do you implement this using LabVIEW instead of doing it directly in Excel.
    Before worrying about the second part (which, while not so difficult, is not something for a LabVIEW "beginner"), think about how to handle the first part, say, in Excel, itself.  Write down an algorithm, taking into account (a) how to determine which cells to test, (b) what test to make (or even if you want to make a test), and (c) how to determine what to put into the cell.
    Come back when you've done at least this much (and spell out the algorithm).
    BS

  • Trying to add data to phone with money already on my accout how do i do it

    trying to add data to my phone with money already on my account how do i do it

        Hi joshua1971,
    Let's get this figured out! Do you have Post-Pay or Pre-Pay service with us? If Pre-Pay please call:888-294-6804.
    Thanks,
    AyaniB_VZW
    Follow us on Twitter @VZWSupport

  • How do I show/refresh data from an Access Web App in an Excel spreadsheet saved in a Document Library on Sharepoint 2013 online

    I have an Access 2013 Web App in my Sharepoint 2013 online website. It contains a query to report on its data (several, actually, but let's keep it simple). I want to connect an Excel spreadsheet to the query, visualise the data in pivot tables/graphs/whatever,
    save the spreadsheet in a Document Library, and let other team site Sharepoint users open the spreadsheet (preferably in Excel online, but with Excel client if it has to be) and see/copy the data, refreshed with the latest information from the Access Web App.
    Simple, surely!
    The way I'm doing it at the moment is to create an ODC file to connect to the cloud-based Access 2013 database, save that ODC in a Data Connection Library in the SP site, and use the saved ODC file as data source in the Excel spreadsheet. This works and
    successfully keeps everything 'in the cloud' but I can't get it to refresh in Excel Online, and if I open the spreadsheet in Excel Client I have to enter the database password every time to refresh it. I don't really want to issue this password to everyone
    who might want to view the data. There must be a better way than this ODC method, I suspect.
    Googlings on this have led down various blind alleys - Excel Services, PowerPivots, Web Parts - but I'm stuck on which to follow through. Please, someone, point me to an article/book/website that explains how to do this step-by-step in simple language..
    thanks
    Jonathan

    I don't see any quick way of achieving it - at least there's no such functionality exists in SharePoint. All you can do, develop an event receiver that will update the fields in the list item once the excel file is added/updated. You can use OpenXml API
    to manipulate the excel file.
    Thanks,
    Sohel Rana
    http://ranaictiu-technicalblog.blogspot.com

  • 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

  • How to set a list form field data value that is linked to another document library's data when the link gets broken!!??

    In summary, I have created 3 document libraries and one issues list in a site collection.
    The issues list has a form that has mainly been created in SharePoint 2010 but tweaked in InfoPath 2007 and one of the fields links to the title of a document in the first document library (so an issue can be linked/referenced to a particular document).
    This all works great until I want to move a document (using the workflow that I built) from document library 1, to document library 2 or 3 as this is what I've set up to move documents through the business process we are taking it through.
    When this happens, the link between the issue that was raised originally against the document is broken and therefore you can no longer tell which document the issue is linked with.
    Does anyone know a way of 'setting' the field that is linked to data in another document library on original selection/creation of the issue, so that when the link is broken the original data remains.
    Any ideas welcome as I am stomped!!! 
    Cheers!!
    Louis Maxwell

    
    Hi  Louis,
    According to your description, my understanding is that you want to keep the link field of the issue list working after moving the linked document.
    Whether the link field  is a lookup column or not ?
    If so, due to the information source of  lookup column cannot be changed, you need to add other lookup fields for document library 2 and document library 3. Just one lookup column corresponds one document
    library. Then you can update the lookup column in the workflow when move the linked document. Such as when a document is moved to document library 2, you need to clear the lookup1 field (corresponding document library 1) and update the lookup2 field (corresponding
    document library 2).
    For updating the lookup column, you can refer to the following actions:
    Best Regards,
    Eric
    Eric Tao
    TechNet Community Support

  • Create an excel and upload it in document library through c#

     Hi everyone,
       I have one requirement in my organization . pickup data from multiple lists from sharepoint silte and convert it as an excel spredsheet and save it to the document library in c# progamming
     Can any one help me 
    Thanks 
    Nag

    Hi Nag,
    Per my understanding, you might want to gather data from multiple lists, generate an Excel file and save to a Document Library using C#.
    There will be several steps in this scenario: get data from SharePoint List using SharePoint Object Model, create an Excel file and save to a Document Library, then
    access this Excel file with the help of Excel Web Services.
    About the retrieving data from a SharePoint list, we can use SharePoint Object Model:
    SharePoint Object Model - SPListItem class
    http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.splistitem.aspx
    Add, Update and Delete List Items Programmatically in SharePoint
    http://www.mindfiresolutions.com/Add-Update-and-Delete-List-Items-Programmatically-in-Sharepoint-372.php
    About how to create document in a SharePoint library programmatically:
    https://nickgrattan.wordpress.com/2008/12/08/code-for-creating-new-documents-based-on-a-content-type-and-template/
    About how to work with Excel web Services: 
    https://msdn.microsoft.com/en-us/library/office/ms572330(v=office.15).aspx
    https://msdn.microsoft.com/en-us/library/office/ff640648(v=office.14).aspx
    Best regards
    Patrick Liang
    TechNet Community Support

  • Add single/multiple line of text in a document library

    Hello,
    I was wondering if there is a way to have a document library that gives you the ability to add text based items in the same column as the file you upload through the library, like you can do through lists. For example, I want to be able to have the freedom
    to add text before or after the file that was uploaded, but still keeping everything in the list (so I'm not actually uploading a file everytime).
    Name <--- column
    Text text text text text text text text text text text text
    Text.jpg
    And here's more text... the end.
    Is this possible? I'm not sure how much extra coding I can add to this because my document libraries are apart of custom web part and adding javascript to the library may break up the web part. 

    i dont think their is OOB way to achieve this.
    I am thinking...
     create 3 Columns
    Text Before as Single text or multiple
    Text After as Single text or multiple
    Calculated column
    Now in Calculated column = Text before + Url(Column) + Text after.
    Please remember to mark your question as answered &Vote helpful,if this solves/helps your problem. ****************************************************************************************** Thanks -WS MCITP(SharePoint 2010, 2013) Blog: http://wscheema.com/blog

  • ABAP solution to read data from excel file attached with project document

    i have a project created through tcode cj20n and attach an excel file with it. now my objective is to read the contents of that attach file through abap. can any one please help me in this matter? how can i know the path of that file?

    Hi,
    you can't do it in 30 minutes if you never did before.
    Use[ DOI |http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCCIOFFI/BCCIOFFI.pdf]
    Regards,
    Clemens

  • Create a visual web part which get data from excel sheet and import it into sql server database in sharepoint 2010 (development)

    Hi,
    I want to create a visual webpart which will read data from excel sheet and import it in to sql server database.(using sharepoint development)
    I want to do it using visual webpart.
    Please help to solve the issue.
    Thanks in advance!
    Regards
    Rajni

    Hi  Rajni,
    Microsoft.Office.Interop.Excel assembly provides class to read excel file data, in your web part solution, reference the assembly, and following blog contains samples about how to read the excel file data,
    and import it to SQL  database.
    1.Create a Visual Web Part Project:Create
    Visual Web Parts in SharePoint 2010
    2.Read the excel workbook by using SPFile class:
    http://alancejacob.blogspot.in/2012/06/read-data-from-excel-file-and-insert-in.html
    http://stackoverflow.com/questions/14496608/read-excel-file-stored-in-sharepoint-document-library
    3.Export the excel workbook to SQL Server:
    http://www.c-sharpcorner.com/UploadFile/99bb20/import-excel-data-to-sql-server-in-Asp-Net/
    Best Regards,
    Eric
    Eric Tao
    TechNet Community Support

  • Create excel file in document library from the data in datatable

    Hi ,
    I want to generate files dynamically and have then saved to my documetn library instead of  some location on the  harddisk.
    I want to generate and excel file  which will read data from the sharepoint list.
    Form that data excel will be genereated in the code ,and i want the generated excel directly available in the  document library.
    I could use open xml of excel itneroperablity for the excel file generation.
    How can i do that.

    Hi,
    According to your description, you might want to gather data from a SharePoint list as an excel file and upload it to a Document Library.
    As you said, you can generate an Excel file using the Open XML SDK, I will provide some information about how to get data from SharePoint list and how to upload files
    to a Document Library.
    About the retrieving data from a SharePoint list, we can use SharePoint Object Model:
    SharePoint Object Model -
    SPListItem class
    http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.splistitem.aspx 
    Add, Update and Delete List Items Programmatically in SharePoint
    http://www.mindfiresolutions.com/Add-Update-and-Delete-List-Items-Programmatically-in-Sharepoint-372.php 
    About
    How to: Upload a File to a SharePoint Site from a Local Folder:
    https://msdn.microsoft.com/en-us/library/office/ms454491(v=office.14).aspx
    Thanks
    Patrick Liang
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support,
    contact [email protected]
    Patrick Liang
    TechNet Community Support

  • Extracting Raw Data Using Excel Services REST API

    I am trying to create a home page in SharePoint 2013 that shows quick stats based on an Excel workbook stored in a document library. Through my research I found that I could leverage the Excel Services REST API to pull the information I need from the workbook
    via URIs and display it on a SharePoint page in a seamless manner.
    The problem I am having is pulling the data I need as raw text.
    For example, I can create a page in HTML that says "Our sales for the month grew by [X%]" and use an img src tag that points to
    http://sample.com/_vti_bin/ExcelRest.aspx/Documents/workbook.xlsx/Model/Ranges('Sheet1!A1')?$format=image to show a picture of cell A1 which contains the data I want to show inline on my page.
    I want a way to pull the data in cell A1 as raw text so that I can format it as part of the HTML page. I tried using
    $format=html, but that just takes me to a separate page where the cell is formatted exactly as it is in the workbook.
    Is there a way to do what I am trying to do? The more detailed your response can be, the better as I am fairly new to these features. And also, is there a way to perform calculations of cells in HTML? Thanks in advance.

    Hi,
    According to your description, you might want to extract text value from a specific cell in an Excel file using Excel Services REST API.
    As there is no such predefined format can be used to return text value only, I would suggest you return the value as json format, then parse it and set to your HTML
    tag using jQuery.
    Here is a <p> tag with a script which can set the value of the <p> tag with the value gets from cell “A1”:
    <p id="cell1">test</p>
    <script type="text/javascript" src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
    <script type="text/javascript">
    //replace the strings below with yours
    var libName = "Shared Documents";
    var fileName = "Book1.xlsx";
    var rangeName = "A1";
    $(function(){
    var s = getCellValue(libName, fileName, rangeName);
    $("#cell1").html(s);
    function getCellValue (libName, fileName, rangeName)
    var cell = "";
    $.ajax({
    url: _spPageContextInfo.webAbsoluteUrl + "/_vti_bin/ExcelRest.aspx/"+libName+"/"+fileName+"/model/Ranges('"+rangeName+"')?$format=json",
    method: "GET",
    headers: { "Accept": "application/json; odata=verbose" },
    dataType: "json",
    async: false,
    success: function (data) {
    console.log(data.rows[0][0].v);
    cell = data.rows[0][0].v;
    error: function (data) {
    console.log(data);
    return cell;
    </script>
    You can add it into your page via a Content Editor Web Part, it will take effect after the page loaded.
    Here are two links about how to add code into page via Content Editor Web Part:
    http://blogs.msdn.com/b/sharepointdev/archive/2011/04/14/using-the-javascript-object-model-in-a-content-editor-web-part.aspx
    http://sharepointadam.com/2010/08/31/insert-javascript-into-a-content-editor-web-part-cewp/
    Best regards
    Patrick Liang
    TechNet Community Support

  • Add data source problem

    This is my problem:
    When I select the Data option in the Main menu bar or in the Server Navigation window and then select the Add Data Source option, the Edit Database Server Types window is displayed instead. If you try to cancel or close the window it will only be redisplayed. The only way out of this is terminating the program with the Windows Task Manager.
    Platform: Windows XP
    Creator: 2004Q2 Update 8
    Thanks in advance for any help
    lasc

    hi,
    when i try to add a data source i usually get a dialog box titled Add Data Source in which there are options to decide on the Server Type among other options ,
    i dont know if this is the type of dialog box u r getting , and if so then nothig is wrong,
    bu if not! i have no idea why is that happening but i can suggest that it is normal to decide on the data base server before creating the data source in order for the creator ro use the right driver, i guess so,
    Good luck,
    sssnbj

Maybe you are looking for

  • I am unable to see print preview for my sales orders in VA03.

    Hi All, I am unable to see print preview for my sales orders in VA03. When ever i am selecting an order and from menu-> sales document-> issue output to it is raising information message on my status bar no output has been selected for printing. How

  • Iphone 3gs wont sync

    Whenever i try to sync my iphone to my computer, the computer will recognize the camera of my phone, but itunes does not register that the phone is connected. I tried restarting services, and i reinstalled itunes and all like it said to. if anybody h

  • Different log4j outputs using same compiler

    Hello. I've created a desktop application and recently added log4j logging. When I compile my application using the NetBeans' generated ant script and run it, I get output like: [java] 2008-06-17 15:42:16,383 INFO [main] (MainFrame.java:1604) - Start

  • Re: Photoshop CC - adjustment layer curves issue

    First post here in the discussion, Just upgraded CS6 to CC and really enjoy alot of the changes but there seems to be a bug with the adjustment layer curves (not regular curves). If I make a change to the curve using modification point and then toggl

  • Photoshop Elements 11 hard drive space system requirement?

    I have a macbook pro with 4gb of memory in the hard-drive. I wanted to get photoshop elements 11 but the system requirements includes 4gb of hard-drive. Because some of my memory has been used up, does that mean I can not install photoshop elements 1