Upload Excel data to Sharepoint list VIA infopath form

Hi,
I'll try to explain the process of what I want to do first.
1. In Excel
I have an exceldocument (XLS, XLSX or XLSM) with 4 named columns and a named worksheet saved locally on my computer.
I want to upload this data into preferably a custom list in sharepoint but it needs to run via a infopath template first.
2. In Infopath
The Infopath template will prompt the user to specify values in 2 additional fields.
After giving input to these fields user may browse for the locally stored excel document and upload the document.
In the same infopath template a dynamic array should be visible containing 6 columns (4 from excel + 2 from headerlevel of template) and the amount of rows based on the number of rows from excelsheet.
At the end of template a submit button is found for uploading the entire array into sharepoint custom list.
Is this possible to do at all?
NOTE! End user should not have to save the excelsheet as XML file nor do a XML mapping.
Infopath should, perhaps with help of VBA read excelsheet and transfer data to correct destination in sharepoint on it self.
Looking forward to your reply

Hi Jonas,
You can attach your Excel doucment into InfoPath form and send InfoPath form to a custom web service. Then you can parse the Excel data and combine the Excel data and additional fields into SharePoint list in the customized  web service.
For more information, you can have a look at the thread:
http://dandeng.blogspot.com/2012/03/submit-infopath-form-data-to-web.html
http://www.codeproject.com/Articles/88547/Submit-entire-InfoPath-form-to-web-service
https://social.msdn.microsoft.com/Forums/office/en-US/590f1e78-5c08-47bd-8af4-9709102b568d/webservice-to-send-attachments-in-infopath-form-to-different-location?forum=sharepointcustomization
https://msdn.microsoft.com/en-us/library/office/gg575571.aspx?f=255&MSPPError=-2147217396
Best Regards,
Eric
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]

Similar Messages

  • Updating a secondary datasource to a Sharepoint list via infopath form rules

    Using SharePoint 2010 and InfoPath 2010 I created a form that prior to submission it gets an integer value from a separate SharePoint list via a secondary datasource.  Just before the rule that submits the form to a document folder via the
    main datasource I increment the integer value and try to write it back to the secondary datasource I got it from.  I know that I have the correct value.  That is, it is reading from the data source the correct integer information and it is incrementing
    it in the form but when it writes the value back to the same column in the same secondary datasource it doesn't give any indication that it didn't work.  But when I look at the list of the secondary data source I see that the integer value is
    not updated.

    Hi Jonas,
    You can attach your Excel doucment into InfoPath form and send InfoPath form to a custom web service. Then you can parse the Excel data and combine the Excel data and additional fields into SharePoint list in the customized  web service.
    For more information, you can have a look at the thread:
    http://dandeng.blogspot.com/2012/03/submit-infopath-form-data-to-web.html
    http://www.codeproject.com/Articles/88547/Submit-entire-InfoPath-form-to-web-service
    https://social.msdn.microsoft.com/Forums/office/en-US/590f1e78-5c08-47bd-8af4-9709102b568d/webservice-to-send-attachments-in-infopath-form-to-different-location?forum=sharepointcustomization
    https://msdn.microsoft.com/en-us/library/office/gg575571.aspx?f=255&MSPPError=-2147217396
    Best Regards,
    Eric
    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]

  • VBA code to update Excel Data in sharePoint list

    hi Team,
    I have excel sheet created having data. I need to upload it in sharepoint List.
    Please provide me VBA code for the same.

    Please try this.
    Sub UpdateSpecificCells()
    'If nobody has the file checked out
    If Workbooks.CanCheckOut("http://excel-pc:43231/Shared Documents/ExcelList.xlsb") = True Then
    Application.DisplayAlerts = False
    'Open the file on the SharePoint server
    Workbooks.Open Filename:="http://excel-pc:43231/Shared Documents/ExcelList.xlsb", UpdateLinks:=xlUpdateLinksNever
    ActiveSheet.Cells(2, 7).Value = 100
    ActiveSheet.Cells(3, 7).Value = 200
    ActiveSheet.Cells(4, 7).Value = 300
    'Close the workbook
    Workbooks("ExcelList.xlsb").Save
    Workbooks("ExcelList.xlsb").Close
    End If
    End Sub
    I haven't used SharePoint in many years, and I can't test that code now, but I've used that before to update Excel files in SharePoint.
    Knowledge is the only thing that I can give you, and still retain, and we are both better off for it.

  • How to upload Excel data in Ztables fastly & easily.

    Dear ALL,
    I  want to compare material codes in 2 different excel sheets.
    I have downloaded output from 2 different SQVI into 2 different excel sheets.
    Now I want to compare these 2 sheets to get matching codes or unmatching codes.
    I can use VLOOKUP in excel also. But How can I make use of ABAP by downloading these excel data in 2 different Ztables and compare these 2 tables with some user defined TC (transaction code) ?
    For this activity How to upload Excel data(2 sheets) in 2 Ztables fastly & easily ?
    Is there any method other than SCAT , BDC and LSMW  ???
    Or which is best method in above ?
    Pl' reply.
    Thanks.

    Have a look at the program
    *: Description                                                :
    *: This is a simple example program to get data from an excel :
    *: file and store it in an internal table.                    :
    *: Author : www.sapdev.co.uk, based on code from Jayanta      :
    *: SAP Version : 4.7                                          :
    REPORT  zupload_excel_to_itab.
    TYPE-POOLS: truxs.
    PARAMETERS: p_file TYPE  rlgrap-filename.
    TYPES: BEGIN OF t_datatab,
          col1(30)    TYPE c,
          col2(30)    TYPE c,
          col3(30)    TYPE c,
          END OF t_datatab.
    DATA: it_datatab type standard table of t_datatab,
          wa_datatab type t_datatab.
    DATA: it_raw TYPE truxs_t_text_data.
    At selection screen
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
      CALL FUNCTION 'F4_FILENAME'
        EXPORTING
          field_name = 'P_FILE'
        IMPORTING
          file_name  = p_file.
    *START-OF-SELECTION.
    START-OF-SELECTION.
      CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
        EXPORTING
        I_FIELD_SEPERATOR        =
          i_line_header            =  'X'
          i_tab_raw_data           =  it_raw       " WORK TABLE
          i_filename               =  p_file
        TABLES
          i_tab_converted_data     = it_datatab[]    "ACTUAL DATA
       EXCEPTIONS
          conversion_failed        = 1
          OTHERS                   = 2.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    END-OF-SELECTION.
    END-OF-SELECTION.
      LOOP AT it_datatab INTO wa_datatab.
        WRITE:/ wa_datatab-col1,
                wa_datatab-col2,
                wa_datatab-col3.
      ENDLOOP.
    Message was edited by:
            K N  REDDY

  • Upload excel data into Internal table

    Hi,
    I'm trying to upload excel data into internal table, well the excel file layout will be different on each run of the report.
    Excel file will have 60 columns and 500 record limit. I can upload the excel data using 'ALSM_EXCEL_TO_INTERNAL_TABLE' and 'KCD_EXCEL_OLE_TO_INT_CONVERT' but the output table is generates 60 lines for each record i.e.., 60 * 500 = 30,000 which could cause performance.
    I try with the FM 'TEXT_CONVERT_XLS_TO_SAP', but this will only work if the file structure is static. It didn't work for dynamic file layout. Even GUI_UPLOAD doesn't work to upload excel file, it will work if I convert the file to Tab delimited file.
    Please advise if you know any alternate procedure to upload excel data into internal table.
    Thanks,
    Kumar.

    Moderator message - Cross post locked
    Rob

  • Problem in Uploading Excel Data ! - Urgent

    Dear Experts,
    I am uploading excel data using FM 'TEXT_CONVERT_XLS_TO_SAP' , its directly convert data and store in internal table same as in excel sheet(row , column wise).
    But the problem is , one of the column having description more then 500 characters. so while uploding excel to itab its truncating the text and only uploding 255 characters.
    Is there any other way , so that i can upload more then 500 characters long text. Also i have tried 'ALSM_EXCEL_TO_INTERNAL_TABLE' FM , it was also not working.
    Please Help me , its Urgent.
    Points will be rewared.
    Thanks & Regards,

    Hi,
    Please use FM 'GUI_UPLOAD'.
    types: begin of ttab,
           rec(1000) type c,
           end of ttab.
    types: begin of tdat,
           fld1(10) type c,
           fld2(10) type c,
           fld3(10) type c,
           end of tdat.
    data: itab type table of ttab with header line.
    data: idat type table of tdat with header line.
    data: file_str type string.
    parameters: p_file type localfile.
    at selection-screen on value-request for p_file.
      call function 'KD_GET_FILENAME_ON_F4'
           exporting
                static    = 'X'
           changing
                file_name = p_file.
    start-of-selection.
      file_str = p_file.
      call function 'GUI_UPLOAD'
           exporting
                filename                = file_str
                filetype                = 'ASC'
           tables
                data_tab                = itab
           exceptions
                file_open_error         = 1
                file_read_error         = 2
                no_batch                = 3
                gui_refuse_filetransfer = 4
                invalid_type            = 5
                no_authority            = 6
                unknown_error           = 7
                bad_data_format         = 8
                header_not_allowed      = 9
                separator_not_allowed   = 10
                header_too_long         = 11
                unknown_dp_error        = 12
                access_denied           = 13
                dp_out_of_memory        = 14
                disk_full               = 15
                dp_timeout              = 16
                others                  = 17.
    Best regards,
    Prashant

  • Upload excel data thru gui_upload in CRM

    Hi,
      Can anyone tell me how to upload excel data into internal table thru GUI_UPLOAD only in CRM without converting into text files. Please help me out.
    Thanks in advance.
    regards
    sireesha

    hi,
    Use the FM 'ALSM_EXCEL_TO_INTERNAL_TABLE'.
    call function 'ALSM_EXCEL_TO_INTERNAL_TABLE'
      exporting
        filename                      = filename
        i_begin_col                   = i_begin_col
        i_begin_row                   = i_begin_row
        i_end_col                     = i_end_col
        i_end_row                     = i_end_row
      tables
        intern                        = intern
    EXCEPTIONS
       INCONSISTENT_PARAMETERS       = 1
       UPLOAD_OLE                    = 2
       OTHERS                        = 3          .
    if sy-subrc <> 0.
    * error
    endif.
    Regards,
    Richa

  • Save SharePoint list item view form as a word document

    I have a view form in SharePoint 2013, and I am trying to create a button that will export the form into a MS word document.
    So really I am trying save a SharePoint form to a word file. Is that possible?

    yes below are links for reference:
    http://www.c-sharpcorner.com/uploadfile/Roji.Joy/export-sharepoint-list-items-to-word-document/
    https://www.youtube.com/watch?v=tPFKuA8yW4E
    https://social.technet.microsoft.com/Forums/office/en-US/9e38ed97-5156-448d-af71-cf5e949535d6/how-can-i-export-sharepoint-list-item-form-view-to-word-or-pdf?forum=sharepointcustomizationprevious
    http://www.ehow.com/how_5923152_export-sharepoint-list-word-document.html
    http://sharepoint.stackexchange.com/questions/129277/save-sharepoint-list-item-view-form-as-a-word-document
    Please mark as answer if you find it useful else vote for it if it is close to answer..happy sharepointing

  • On excel sheet upload read the workbook and populate data to sharepoint list

    Requirement in my current project:
    In a document library when I upload an excel sheet, a specific workbook has to be read and the contents have to be uploaded to a sharepoint custom list.
    The approach followed was create an event receiver and register as a feature. Following is the code for event receiver.
    public override void ItemAdded(SPItemEventProperties properties)
                base.ItemAdded(properties);
                var list = getSPList("{150301BF-D0BD-452C-90D7-2D6CD082A247}");          
                SPListItem doc = properties.ListItem;
                doc["Msg"] = "items deleted from req list";
                doc.Update();
                string excelname=doc.File.Name;
                System.Diagnostics.EventLog.WriteEntry("ExcelUpload", "calling read excel");
                string filepath = doc.File.Url.ToString();
                doc["Msg"] = "excel name" + excelname + filepath;
                doc.Update();
                readExcel(excelname,filepath);
            private static SPList getSPList(String SPListGuid)
               // SPSite Site = SPContext.Current.Site;
                SPSite Site = new SPSite("http://omistestsrv:32252/sites/OMD");
                SPWeb web = Site.OpenWeb();
                Guid listid = new Guid(SPListGuid);
                web.AllowUnsafeUpdates = true;
                SPList List = web.Lists[listid];
                return List;
            private void readExcel(string excelname,string filepath)
                try
                    SPSecurity.RunWithElevatedPrivileges(delegate()
                        using (SPSite Site = new SPSite("http://omistestsrv:32252/sites/OMD"))
                            SPWeb web = Site.OpenWeb();
                            string workbookpath = web.Url + "/" + filepath;
                            web.AllowUnsafeUpdates = true;
                            var _excelApp = new Microsoft.Office.Interop.Excel.Application();
                            System.Diagnostics.EventLog.WriteEntry("ExcelUpload", "iside read excel");
        //my code breaks or fails when cursor reaches this statement. I am not able to open the excel sheet, there is no    //problem related to the permission. same code snippet works in a console application. but when tried as an
    event    //handler in sharepoint it breaks. can anyone help me to resolve the problem
                            workBook = _excelApp.Workbooks.Open(workbookpath, Type.Missing, Type.Missing, Type.Missing, Type.Missing,Type.Missing,
    Type.Missing, Type.Missing, Type.Missing,Type.Missing, Type.Missing, Type.Missing, Type.Missing,Type.Missing, Type.Missing);
                            System.Diagnostics.EventLog.WriteEntry("ExcelUpload", "after excel open");
                                int numSheets = workBook.Sheets.Count;
                                // Iterate through the sheets. They are indexed starting at 1.
                                System.Diagnostics.EventLog.WriteEntry("ExcelUpload", numSheets.ToString());
                                for (int sheetNum = 12; sheetNum < 13; sheetNum++)
                                    System.Diagnostics.EventLog.WriteEntry("ExcelUpload", "inside first for
    loop");
                                    Worksheet sheet = (Microsoft.Office.Interop.Excel.Worksheet)workBook.Sheets[sheetNum];
                                    Microsoft.Office.Interop.Excel.Range excelRange = sheet.get_Range("A13",
    "P89") as Microsoft.Office.Interop.Excel.Range;
                                    object[,] valueArray = (object[,])excelRange.get_Value(
                                        Microsoft.Office.Interop.Excel.XlRangeValueDataType.xlRangeValueDefault);
                                    var list = getSPList("{150301BF-D0BD-452C-90D7-2D6CD082A247}");
                                    for (int L = 1; L <= excelRange.Rows.Count; L++)
                                        string stringVal = valueArray[L, 1] as string;
                                        if ((valueArray[L, 1] != null) && (!string.IsNullOrEmpty(stringVal)))
                                            System.Diagnostics.EventLog.WriteEntry("ExcelUpload",
    "inside second for loop");
                                            SPListItemCollection
    listItems = list.Items;
                                            SPListItem item = listItems.Add();
                                            item["Product"] = valueArray[L,
    1];
                                            item["App"] = valueArray[L,
    2];
                                            web.AllowUnsafeUpdates
    = true;
                                            item.Update();
                                web.AllowUnsafeUpdates = false;
                                //Or Another Method with valueArray Object like "ProcessObjects(valueArray);"
                                _excelApp.Workbooks.Close();
                    //workBook.Close(false, excelname, null);
                    //Marshal.ReleaseComObject(workBook);
                catch (Exception e)
                    System.Diagnostics.EventLog.WriteEntry("ExcelUpload", e.Message.ToString());
                finally
                    System.Diagnostics.EventLog.WriteEntry("ExcelUpload", "finally block");
    Is this the only approach to meet this requirement or is there any other way to crack it. sharepoint techies please help me.

    as you described the scenario of the event that it should happen when user upload excel to a document library. Event Receiver is your best bet. However if you would have a requirement that users can send excel files any time to a network file location and
    you want to pick it, read it and create list items etc. You would write a sharepoint timer job that would run every 10 minute to check for file and if available on the network drive, perform the operation etc. so that users who send excel file does not need
    to come to the sharepoint etc. You can see that you have Event Receivcer option or Timer job option OR you would write a console application to trigger the code at a scheduled time on sharepoint server etc. so you are using the event receiver in the correct
    scenario.
    Moonis Tahir MVP, MCPD, MCSD.net, MCTS BizTalk 2006/SQL 2005/SharePoint Server 2007 (Dev & Config)

  • Excel Services with SharePoint List Data in SharePoint 2013 - Chart is not refreshing automatically

    Hi Everyone,
    This is My req: I m going to display pie chart and Bar chart in share point 2013.
    Steps I have follwed:
    1. Export the list to excel.
    2.Using the Power Pivot table I have done the chart.
    3. Uploaded into document Library.
    4. Added into the web part. 
    Chart are displaying. But When ever user added the data into the list chart is refreshing.
    Is there any option to refresh the data in chart? Waiting for valuable replies.
    Regards, Manoj Prabakar

    SharePoint lists as data sources in Excel Services is not supported.That's the reason refreshing is not working. There are some work around you can use  -
    Export as Data Feed - Export your SharePoint list as Data Feed , use this data feed to a PowerPivot for Excel workbook and publish this PowerPivot using Excel Services.
    User-defined functions  - write UDF in C# and extend the Excel Services functionality to work with SharePoint lists.
    https://msdn.microsoft.com/library/bb267252(office.12).aspx#Office2007ExcelServicesUnlimited_SharePointLists
    Web Services API -
    The Web Services API can be used to push data from a database and then refresh the data in a SharePoint Server list by using Excel Services.
    JavaScript Object Model - The JavaScript Object Model for Excel Services in Microsoft SharePoint Server 2010 provides many solutions for Excel Services.
    More details  - 
    https://technet.microsoft.com/en-us/library/gg576960.aspx
    Thanks
    Ganesh Jat [My Blog |
    LinkedIn | Twitter ]
    Please click 'Mark As Answer' if a post solves your problem or 'Vote As Helpful' if it was useful.

  • Append excel sheet data to sharepoint list

    HI,
    I have an excel sheet and i have publshed this list on sharepoint 2010.
    Now i want to append some more records to the same list on sharepoint.
    So is it possible in sharepoint?
    Please help to solve the issue.
    Thanks & Regards
    Rajni

    Hi,
    I think there is no other method to update an existing list with Excel. It is only possible to create a new list based on an Excel-Sheet.
    To save an Excel sheet to a list, click Site Actions->More options->Import Spreadsheet.
    Browse for an appropriate file to import. The file will be imported as a list.
    Thanks.
    Tracy Cai
    TechNet Community Support

  • Upload Excel File to SharePoint using VBA

    Hi,
    I copied and modified the code from a friend which he got it from this website forum.
    This apprantely works for some people and not me. Please tell me what I am doing wrong.
    Ignore xxxxxx part of the Sharepoint site. Nothing wrong with the site, i tried many combinations, but I get not response, not even an error.
    Public Const HR_URL = "http://sun.xxxxxx.com/eng/st/Lists/Database%20Change% 20Request"
    Sub test()
    'Upload new Excel sheet to SharePoint
    Call copyToSharePoint(HR_URL, ThisWorkbook.FullName)
    End Sub
    '''''''code block from Forum
    Public Sub copyToSharePoint(sharepointURL As String, filePath As String)
    'On Error GoTo errhandler
    'sharePointUrl should not end in a "/"
    'Initialize Variables
    Dim LlFileLength As Long
    Dim Lvarbin() As Byte
    Dim LobjXML As Object
    Dim LvarBinData As Variant
    Dim LstrFileName As String, PstrFullfileName As String, PstrTargetURL As String
    Dim fileName As String, lenFileName As Long
    'Extract file name
    lenFileName = Len(filePath) - InStrRev(filePath, "\")
    fileName = Right(filePath, lenFileName)
    'Check that the webUrl ends in an "/"
    If Right(sharepointURL, 1) <> "/" Then
    sharepointURL = sharepointURL & "/"
    End If
    '**************************** Upload binary files *****************
    Set LobjXML = CreateObject("Microsoft.XMLHTTP")
    PstrFullfileName = filePath
    LlFileLength = FileLen(PstrFullfileName) - 1
    ' Read the file into a byte array.
    ReDim Lvarbin(LlFileLength)
    Open PstrFullfileName For Binary As #1
    Get #1, , Lvarbin
    Close #1
    ' Convert to variant to PUT.
    LvarBinData = Lvarbin
    PstrTargetURL = sharepointURL & fileName
    ' Put the data to the server; false means synchronous.
    LobjXML.Open "PUT", PstrTargetURL, False
    ' Send the file in.
    LobjXML.Send LvarBinData
    Set LobjXML = Nothing
    Exit Sub
    errhandler:
    If Err.Number = 53 Then
    MsgBox "Excel was unable to create the HR file to submit to SharePoint. " & vbNewLine & _
    "Please check that you are not running out of disk space and that no MS Office add-in is causing issues with Excel.", vbCritical, "File Error"
    Exit Sub
    Else
    MsgBox "Your HR could not be submitted to SharePoint. The following error occurred:" & vbNewLine & _
    "Error " & Err.Number & ": " & Err.Description, vbCritical, "Error Uploading to SharePoint"
    Exit Sub
    End If
    End Sub

    I have made the following code work successfully on a Windows 8 machine with the VBA executing from an Excel 2010 file and the file you want to upload going to a SharePoint 2010 site. If you don't need to use SP content types then simply
    take that out of the code. Also, pay attention to the FieldInformation as the Field Display names and Field Internal names can sometimes be different. Cheers.
    Public Sub copyDocToSP()
    Const strLocalFile = "C:\temp\myLocalFile.pdf"
    Const spBASE_URL = "https://thesharepointdomian/sites/yoursite/"
    Const spDOC_LIB = "Your SP Doc Library Name"
    Const spFILE_NAME = "FileNameOnceOnSharepoint.pdf"
    Const spCONTENT_TYPE = "0x000000000000000000000000000000000000000"
    Set ObjectStream = CreateObject("ADODB.Stream")
    Set ObjectDOM = CreateObject("Microsoft.XMLDOM")
    Set ObjectElement = ObjectDOM.createElement("TMP")
    Set ObjectHTTP = CreateObject("Microsoft.XMLHTTP")
    'Reading binary file
    ObjectStream.Open
    ObjectStream.Type = 1 'Type Binary
    ObjectStream.LoadFromFile (strLocalFile)
    BinaryFile = ObjectStream.Read()
    ObjectStream.Close
    'Conversion Base64
    ObjectElement.DataType = "bin.base64" 'Type Base64
    ObjectElement.nodeTypedValue = BinaryFile
    EncodedFile = ObjectElement.Text
    'Build request to load document
    strURLService = spBASE_URL + "_vti_bin/copy.asmx"
    strSOAPAction = "http://schemas.microsoft.com/sharepoint/soap/CopyIntoItems"
    strSOAPCommand = "<?xml version='1.0' encoding='utf-8'?>" & _
    "<soap:Envelope xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'>" & _
    "<soap:Body>" & _
    "<CopyIntoItems xmlns='http://schemas.microsoft.com/sharepoint/soap/'>" & _
    "<SourceUrl>" + strLocalFile + "</SourceUrl>" & _
    "<DestinationUrls>" & _
    "<string>" + spBASE_URL + spDOC_LIB + "/" + spFILE_NAME + "</string>" & _
    "</DestinationUrls>" & _
    "<Fields>" & _
    "<FieldInformation Type='Text' InternalName='Title' DisplayName='Title' Value='this is the title value' />" & _
    "<FieldInformation Type='Choice' InternalName='Our_x0020_Status' DisplayName='Our Document Status' Value='Ready-to-distribute' />" & _
    "<FieldInformation Type='Text' InternalName='ContentTypeId' DisplayName='Content Type ID' Value='" + spCONTENT_TYPE + "' />" & _
    "</Fields>" & _
    "<Stream>" + EncodedFile + "</Stream>" & _
    "</CopyIntoItems>" & _
    "</soap:Body>" & _
    "</soap:Envelope>"
    ObjectHTTP.Open "Get", strURLService, False
    ObjectHTTP.SetRequestHeader "Content-Type", "text/xml; charset=utf-8"
    ObjectHTTP.SetRequestHeader "SOAPAction", strSOAPAction
    ObjectHTTP.Send strSOAPCommand
    MsgBox (ObjectHTTP.responseText)
    End Sub

  • Issue adding to a sharepoint list via WCF

    I've written a console app that parses an excel spreadsheet and places the information into a sharepoint list for Donation Requests (I'm doing this because the Excel spreadsheet is so bad that I couldn't upload it directly).  I'm using WCF to connect
    to my site, but when I go to save changes I get a System.Data.Services.Client.DataServicesClientException: Not Found error.
    Here is the code I am using to do the upload:
    /// <summary>
    /// This will add a donation request item to the dev site with the information in the current row
    /// </summary>
    /// <param name="row">The current row that we are working with</param>
    /// <param name="currentRowID">the id of the current row we are working with</param>
    private static void addToDev(DataRow row, string currentRowID)
    //create the data context
    DevIntranet.TeamSiteDataContext dc = new DevIntranet.TeamSiteDataContext(new Uri("http://devintranet.choctawnation.com/_vti/bin/ListData.svc/"));
    dc.Credentials = System.Net.CredentialCache.DefaultCredentials;
    var donationsSource = dc.DonationRequests;
    dc.AddToDonationRequests(
    new DonationRequestsItem
    Title = string.Empty,
    RequestDate = Convert.ToDateTime(row["mel"].ToString()),
    FormOfRequest = row["Form of Request"].ToString(),
    NameOfIndividualOrGroup = row["Name of Individual or Group"].ToString(),
    DescrptionOfRequest = row["Description of Request"].ToString(),
    //AmountRequested = Convert.ToDouble( row["Amount_Requested"].ToString()),
    County = row["County"].ToString(),
    ActionTaken = row["Action Taken"].ToString(),
    Status = row["Status"].ToString(),
    ProcessedDate = Convert.ToDateTime (row["Processed Date"].ToString()),
    //DonatedAmount = Convert.ToDouble (row["Amount_Donated"].ToString()),
    CheckRequest = row["Ck# Request by"].ToString(),
    CheckDate = Convert.ToDateTime(row["Ck# Date"].ToString()),
    CheckNumber = row["Ck# No#"].ToString (),
    Notes = "<p><em>Added to SharePoint from Excel File on " + DateAndTime.Now.ToShortDateString () + "</em></p>",
    Created = Convert.ToDateTime (row["mel"].ToString())
    //try to save
    try
    dc.SaveChanges();
    Console.WriteLine("Row ID " + currentRowID + " added to SharePoint.");
    catch (Exception ex)
    Console.WriteLine("Error uploading to SharePoint: Row ID: " +
    currentRowID + "." + Environment.NewLine +
    "Error given: " + ex.InnerException .ToString());

    Hi David,
    Thanks for your sharing.
    Best Regards
    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]
    Jerry Guo
    TechNet Community Support

  • Uploading multiple documents into sharepoint list item with REST in sharepoint 2013 using content editor web part :

    hi ,
    i am trying to upload multiple document files into sharepoint list item. I followed below link for implementaion.
    http://techfindings-prem.blogspot.in/search/label/jquery.multifilejs
    It was working for sharepoint hosted app.
     This complete code is written within content edito web part.
    It was working when i was in root site collection with below change (hard coded the root level url) in code in "UploadFile" function.
    var scriptbase = "http://servername" + "/_layouts/15/";
                console.log(' File size:' + bytes.length);
                $.getScript(scriptbase + "SP.RequestExecutor.js", function () {
                    var createitem = new SP.RequestExecutor("http://servername");
                    createitem.executeAsync({
                        url: "http://servername/sites/cpg/" + "/_api/web/lists/GetByTitle('SalesRecord')/items(" + attachmentitemid + ")/AttachmentFiles/add(FileName='"
    + fileName + "')",
                        method: "POST",
                        binaryStringRequestBody: true,
                        body: binary,
                        success: fsucc,
                        error: ferr,
                        state: "Update"
                    function fsucc(data) {
                        //alert( data.statusText + "\n\n" + data.responseText);
                        console.log(data + ' uploaded successfully');
                        deferred.resolve(data);
                    function ferr(data) {
                        //alert( data.statusText + "\n\n" + data.responseText);
                        console.log(fileName + "not uploaded error");
                        deferred.reject(data);
    But the issue came in picture when i was working with the other site collection instead of root one. The url was like below.
    "http://servername/sites/cpg/". This time i need to be there within "cpg" site collection. 
    Now if i hard code the url as i did above my code gets break here while come to below line
     $.getScript(scriptbase + "SP.RequestExecutor.js", function () {
    I am getting error when i used below code:
    var scriptbase = "http://servername" + "/_layouts/15/";
     $.getScript(scriptbase + "SP.RequestExecutor.js", function () {
                    var createitem = new SP.RequestExecutor("http://servername");
                    createitem.executeAsync({
                        url: "http://servername/sites/cpg/" + "/_api/web/lists/GetByTitle('SalesRecord')/items(" + attachmentitemid + ")/AttachmentFiles/add(FileName='"
    + fileName + "')",
                        method: "POST",
                        binaryStringRequestBody: true,
                        body: binary,
                        success: fsucc,
                        error: ferr,
                        state: "Update"
                    function fsucc(data) {
                        //alert( data.statusText + "\n\n" + data.responseText);
                        console.log(data + ' uploaded successfully');
                        deferred.resolve(data);
                    function ferr(data) {
                        //alert( data.statusText + "\n\n" + data.responseText);
                        console.log(fileName + "not uploaded error");
                        deferred.reject(data);
    Please hekp in this case. This complete code is written within content edito web part. 
    Regards:
    Sanjay Joshi

    Hi,
    According to your post, my understanding is that you have an issue about upload multiple documents files into library vai REST API.
    As you have said, you have used the hard code url in your code.
    How about use the _spPageContextInfo.webAbsoluteUrl method to get the url?
    I have used this method to get the url, then use the code in the article you have pasted within a content editor web part to upload the files.
    You can replace the hard code url with the _spPageContextInfo.webAbsoluteUrl method, then check whether it works.
    Thanks,
    Jason
    Jason Guo
    TechNet Community Support

  • Upload excel data in a table maintenance view

    Hi,
      I have a requirement to add a button in the application toolbar of the table maintenance screen of a custom table. This button should upload the excel sheet data into the maintenance screen online.
      I have created the button in the table maintenance generator. Also, uploaded the data into the internal table from the excel sheet.
      The problem is I am unable to populate the data from the internal table to the maintenance screen online.
      Any pointers in this regards will be appreciated.
    Thanks,
    Best regards,
    Ajith

    Hi,
    I think you have to use BDC call transaction (SM30) and use that table control to upload the data. Try and see..
    Cheers,
    Phani.

Maybe you are looking for

  • Accessing the EAC in different sites

    I currently have an Exchange 2010 environment with a 3 node DAG.  All servers are 2008R2 and we have 2 production servers and one DR server (at a remote site). I am working on upgrading our Exchange to 2013 and have installed 2013 SP1 on -3- 2012R2 p

  • Apple TV and OS 10.10.3

    Apple TV (v3, newest update) doesn't show "Foto" (only "Musik", "Video" etc.) when choosing a Mac with 10.10.3, no problem with an other Mac with 10.10.2

  • How to create a a labview sequence with teststand

    hi  everybody, it might be this question but i haven't found any. I am using TestStand 2.0 and LabVIEW 7.0 and i wanna use labView Sequence adapter to create sequences by using labView step. So that's how i do. 1) After choosing the labveiw standard

  • SAP and Adobe Form - Scripting Issues

    Hello experts, before i start with the the issue, I would like to describe some functions which we have developed in our adobe form (not interactive Form!). We are displaying XHTML Text coming from SAP , in order to load the XTHML into the controls w

  • [SOLVED] Can't update because of xmonad dependencies

    I noticed some trouble I've been having with xmobar and xmonad, so I figured I would try making sure everything is up to date before I did anything else, since that often solves problems. But when I try to run pacman -Syu or yaourt -Syu, it halts bec