CSV File upload in SharePoint 2013

Hi,
We need to upload the CSV file in document library and need to call the java service in the event receiver and read the uploaded CSV file content and parse it as JSON and pass to the java service. 
Is there anyway we can compare the already uploaded file content with same file name user trying to upload again with the same content . In case if user changed the some content and trying to upload again, we nee to identify whether the file is really updated
the content or not. This will avoid the unnecessary java service call. Please let me know the suggestion.
Thank you,
Mylamy

there is no method or properties to compare files.We have do row by row
using power shell we can do it
http://blogs.technet.com/b/stefan_stranger/archive/2011/02/08/compare-two-different-csv-files-using-powershell.aspx
http://social.technet.microsoft.com/Forums/scriptcenter/en-US/00ef8b0d-00d9-42fd-9b6a-c6de58b9bd00/using-powershell-to-compare-2-csv-files?forum=winserverpowershell
other solutions
http://stackoverflow.com/questions/5154370/compare-two-csv-file-using-in-c-sharp
http://stackoverflow.com/questions/3458355/c-sharp-comparing-two-csv-files-and-giving-an-output

Similar Messages

  • Multiple file upload in SharePoint 2013 using AjaxFileUpload

    Hi all,
    I want to add multiple files using file upload control in our visual web part SharePoint 2013. I tried to use AjaxFileUpload (from Ajaxcontrol toolkit) in my visual web part and also added the handler in web.config as described in article (http://www.asp.net/ajaxLibrary/AjaxControlToolkitSampleSite/ajaxFileUpload/ajaxFileUpload.aspx).
    But, it’s not even opening the browse dialog box.
    I also tried to see if any third party control is available to achieve multiple file upload in SharePoint 2013 Visual web part, but without any success.
    Please help.
    Regards,
    Monica

    Hi
    Try to add the dll files of Ajax Control Toolkit in the
    Bin folder of your SharePoint Web Application (IIS Site)
    Hope that help
    Ahmed Naji SharePoint Geek
    MCP|MCTS|MCPD
    My English SharePoint Blog | DotnetFinder My Arabic SharePoint Blog|
    CodeReloaded
    My Gallery Contributions
    SharePoint 2010 Twitter Web Part
    SharePoint 2010 Custom Timer Job

  • 2GB of video file upload to SharePoint 2013 document library

    Hi All,
    We have a requirement of uploading a 2GB of video file to a SharePoint 2013 document library. Will there be any issue due to increasing the maximum file size?
    Many Thanks,
    sudesh withanage

    It will be better if you save all your videos at one location,i.e Asset Library.Check the link for Asset libraries
    http://technet.microsoft.com/en-us/library/ee414275(v=office.15).aspx
    In case you want to add other files (i,e excel ,word) along with videos you will need to increase library size,
    Check the following link to increase the file size ,as well as the issues and workaround to solve the problems
    http://blogs.technet.com/b/praveenh/archive/2012/11/16/issues-with-uploading-large-documents-on-document-library-wss-3-0-amp-moss-2007.aspx
    Please Mark it as answer if this reply helps you in resolving the issue,It will help other users facing similar problem

  • How to change 'Modified By' column value when a new file is uploaded in SharePoint 2013 using Client Object Model?

    I want to change 'Modified By' column value of a file that is being uploaded using Client Object Model in SharePoint 2013. The problem is that the version of the file is changing. Kindly help me. The code that I am using is:
    using (System.IO.Stream fileStream = System.IO.File.OpenRead(m_strFilePath))
        Microsoft.SharePoint.Client.File.SaveBinaryDirect(m_clientContext, str_URLOfFile, fileStream, true);
        Microsoft.SharePoint.Client.File fileUploaded = m_List.RootFolder.Files.GetByUrl(str_URLOfFile);
        m_clientContext.Load(fileUploaded);
        m_clientContext.ExecuteQuery();
        User user1 = m_Web.EnsureUser("User1");
        User user2 = m_Web.EnsureUser("User2");
        ListItem item = fileUploaded.ListItemAllFields;
        fileUploaded.CheckOut();
        item["UserDefinedColumn"] = "UserDefinedValue1";
        item["Title"] = "UserDefinedValue2";
        item["Editor"] = user1;
        item["Author"] = user2;
        item.Update();
        fileUploaded.CheckIn(string.Empty, CheckinType.OverwriteCheckIn);
        m_clientContext.ExecuteQuery();

    Hi talib2608,
    Chris is correct for this issue, when calling update using ListItem.update method, it will increase item versions, using SystemUpdate and UpdateOverwriteVersion will update the list item overwrite version.
    these two methods are not available in CSOM/REST, only server object model is available for this.
    Thanks,
    Qiao Wei
    TechNet Community Support

  • Automatically importing a csv file to a SharePoint list

    I get a csv file from a program every day. Instead of copying and pasting the data into a SP list, is it possible to have the file copied to a location and SP import it on a regular basis? I would avoid the manual copy paste as well as I wouldn't have
    to be present to do the conversion.

    Hi
    Here is the powershell script which you can use
    function Add-CsvDataToList([Microsoft.SharePoint.SPWeb]$web, [string] $listName, [string] $csvPath) {
    $list = $web.Lists.get_Item($listName)
    Import-Csv $csvPath | ForEach-Object {
    $csvRow = $_
    $newItem = $list.Items.Add()
    Get-Member -InputObject $csvRow -MemberType NoteProperty | ForEach-Object {
    $property = $_.Name
    $newItem.set_Item($property, $csvRow.$property) } $newItem.Update()
    Following are the links for reference
    http://blog.brianfarnhill.com/2012/07/populate-a-sharepoint-list-with-items-in-a-csv-file-using-powershell
    http://blogs.technet.com/b/stuffstevesays/archive/2013/06/07/populating-a-sharepoint-list-using-powershell.aspx
    https://ravendra.wordpress.com/uploading-csv-excel-data-into-sharepoint-list/
    Please 'propose as answer'
    if it helped you, also 'vote helpful' if you like this
    reply.
    Amit Kotha

  • How do I import csv file into a SharePoint list?

    I am trying to use a PowerShell script to load data into a SharePoint list from a csv file. When I run my code, it seems to go through the process of loading the data into the list. However when I go to my list, all I see is "System.Object[]" displayed
    in the first column of all my rows with no other data displayed. When I check my csv file, I see a ton of data (several rows and columns) but that is not being moved to my SharePoint list. This is what my script looks like
    if((Get-PSSnapin | Where {$_.Name -eq “Microsoft.SharePoint.PowerShell”}) -eq $null) {
    Add-PSSnapin Microsoft.SharePoint.PowerShell
    $web = Get-SPWeb http://link to web
    $list = $web.lists["List Name"]
    $recordsNumber = 0
    foreach($i in Import-CSV myCSVFile.csv)
    $new = $list.Items.Add()
    $new["Title"] = $i.Title,
    $new["FirstName"] = $i.FirstName,
    $new["LastName"] = $i.LastName
    $new.Update()
    $recordsNumber++
    "Added " + $recordsNumber.ToString() + " records."
    "Done. Press any key to continue..."
    $null = $Host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")
    Any ideas on how to fix this, and get my list populated with data?

    if ( (Get-PSSnapin -Name Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue) -eq $null )
    Add-PsSnapin Microsoft.SharePoint.PowerShell
    $host.Runspace.ThreadOptions = "ReuseThread"
    #Open SharePoint List
    $SPServer=http://SOMESERVER
    $SPAppList="/Lists/List Name/"
    $spWeb = Get-SPWeb $SPServer
    $spData = $spWeb.GetList($SPAppList)
    $InvFile="myCSVFile.csv"
    # Get Data from Inventory CSV File
    $FileExists = (Test-Path $InvFile -PathType Leaf)
    if ($FileExists) {
    "Loading $InvFile for processing..."
    $tblData = Import-CSV $InvFile
    } else {
    "$InvFile not found - stopping import!"
    exit
    # Loop through Applications add each one to SharePoint
    "Uploading data to SharePoint...."
    foreach ($row in $tblData)
    "Adding entry for "+$row."Application Name".ToString()
    $spItem = $spData.AddItem()
    $spItem["Title"] = $row."Title".ToString()
    $spItem["FirstName"] = $row."FirstName".ToString()
    $spItem["LastName"] = $row."LastName".ToString()
    $spItem.Update()
    "Upload Complete"
    $spWeb.Dispose()
    Link
    Please 'propose as answer' if it helped you, also 'vote helpful' if you like this reply.

  • Remote upload into sharepoint 2013 document library (cloud based)

    We have a sharepoint 2013 in the cloud.
    Is it possible to have some kind of service (windows or web based) that can access a document library on said cloud server and put files into said document library?
    I don't think we have a lot of behind the scenes access to the cloud instance of 2013.

    Hi,
    As I said above, we could use the Client Object Model to upload the files without the user having to go to SharePoint in the browser first and logging in.
    We can use the credentials in the code as below, the code would copy files to SharePoint online, it worked well in my environment, you can check whether it works.
    public static void CopyDocuments(string srcUrl, string srcLibrary, string destUrl, string destLibrary)
    // set up the src client
    ClientContext srcContext = new ClientContext(srcUrl);
    SecureString passWord1 = new SecureString();
    foreach (char c in "Password01!".ToCharArray()) passWord1.AppendChar(c);
    srcContext.Credentials = new SharePointOnlineCredentials("[email protected]", passWord1);
    Web srcWeb = srcContext.Web;
    List srcList = srcWeb.Lists.GetByTitle(srcLibrary);
    ListItemCollection itemColl = srcList.GetItems(new CamlQuery());
    srcContext.Load(itemColl);
    srcContext.ExecuteQuery();
    // set up the destination context
    ClientContext destContext = new ClientContext(destUrl);
    SecureString passWord = new SecureString();
    foreach (char c in "Password01!".ToCharArray()) passWord.AppendChar(c);
    destContext.Credentials = new SharePointOnlineCredentials("[email protected]", passWord);
    // get the destination list
    Web destWeb = destContext.Web;
    destContext.Load(destWeb);
    destContext.ExecuteQuery();
    foreach (var doc in itemColl)
    try
    //if (doc.FileSystemObjectType == FileSystemObjectType.File) //Field or Property "FileAttachement not found."
    // get the file
    File file = doc.File;
    srcContext.Load(file);
    srcContext.ExecuteQuery();
    // build destination url
    string nLocation = destWeb.ServerRelativeUrl.TrimEnd('/') + "/" + destLibrary.Replace(" ", "") + "/" + file.Name;
    // read the file, copy the content to new file at new location
    FileInformation fileInfo = File.OpenBinaryDirect(srcContext, file.ServerRelativeUrl);
    File.SaveBinaryDirect(destContext, nLocation, fileInfo.Stream, true);
    catch (Exception ex)
    http://blog.blumshapiro.com/blog/2012/08/22/sharepoint-2010-using-the-client-object-model-to-move-files-and-folders-across-site-collections-and-subsites/
    Thanks,
    Jason
    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].
    Jason Guo
    TechNet Community Support

  • Will Captivate 8 files upload to sharepoint 2010

    has anyone tried creating a captivate 8 responsive file and uploading to sharepoint 2010. Or 2013?

    I don’t understand. Why not?
    We use share point as a “website”
    Can you tell me why?
    thank you for your assistance!!!
    Deborah
    Watch for Gamecon at training magazine 2015! 
    SillyMonkey LLC  Learn fast, Remember more, Have fun doing it  TM Deborah Thomas http://www.sillymonkeyinternational.com 404-966-2372 Click here to access "A Day in the Life of a SME”
    Published:
    Radio Interview   ASTD app  Georgia Game Company LinkedIn: http://www.linkedin.com/in/sillymonkey2008  Twitter: Sillym0nkey
    "If we can integrate games within learning across the curriculum we can make education the proper competition for our children's minds.  
    Nolan Bushnell, Founder of Atari, father of the video game industry
    NOTICE: My email address will change soon!  [email protected]

  • Network File sharing in SharePoint 2013 portal

    Hi Everyone
    I have a set of network folders(shared folder in some server) and want to make use of all this in SharePOint as a portal. So that i can eliminate the use of Network folder sharing concept. Bacially i need to know whether we have any OOB template/s available
    in SharePoint 2013 or its a custom development ?
    Regards
    Prashanth
    SharePoint Administrator

    Hi Prashanth,
    There are multiple ways to move content from fileShares to SharePoint.
    Step 1: Create the SharePoint Information Architecture - create a site collection preferably chose a document center template, create document libraries and folders as per the network folder structure in your organization.
    Step 2: Map your File Share as Network drive in your client machine, and same way map your SharePoint website document library as network drive too. Drag and drop files.
    Note there are 2 issues for this approach,
    1) your document metadata will be lost, the last modified by will change to the account with which you have logged into SharePoint while copying, and the last modified time will be changed.
    2) Its a tedious manual approach if you have lots of files.
    Now for retaining the metadata you will need to depend upon a 3rd party tools ( or this codeplex solution: http://f2sp.codeplex.com/ (I havent verified that this works with Sp 2013 or not).
    Using 3rd party tools has the advantage of retaining metadata and any issues with file naming conventions will also be taken care of most of the prominent tools which otherwise needs to be taken care by administrator manually. - Note SharePoint has file
    naming conventions - https://support2.microsoft.com/kb/905231?wa=wsignin1.0.
    Also In order to reduce the effort in second step you can also create content organizer rules and map your drop off library as the drag and drop location.
    finally do read this awesome blog post by Sean Earp and Andre Kieft before starting of with the project. http://blogs.technet.com/b/ptsblog/archive/2013/11/04/migrating-file-shares-to-sharepoint-online.aspx
    Hope that helps.

  • How to open hyperlink of PDF file uploaded at SharePoint(hosted at Office365) in 'Adobe Acrobat' for annotation and comments.

    Hi,
    I've a hyperlink of PDF file which is uploaded under SharePoint Document library(hosted at Office365 E1) on my custom '../SitePages/Approver.aspx'. Once user click on that hyperlink it should ask me to "Check-Out & Open' pdf file directly from sharePoint document library then it should automatically gets opened into 'Adobe Acrobat' where user will do some annotation/ comments in that pdf file & again 'Check-In' back his changes to SharePoint Document library.
    Following article will explain how I want to Check-In & Check-Out  pdf files from SharePoint document library once i click hyperlink on my '../SitePages/Approver.aspx' page.
    acrobatusers.com/tutorials/how-to-work-with-sharepoint-and-office-365
    Please let me know how to achieve this functionality using office 365.
    Your assistance would be greatly appreciated as this is top-priority requirement for us.
    Yours sincerely,
    Mahesh Sherkar
    [signature deleted by host]

    For instance, the forms.conf file:
    # Virtual path mapping for Forms Java jar and class files (codebase)
    AliasMatch ^/forms/java/(..*) "D:\Oradev/forms/java/$1"
    # Virtual path for JInitiator downloadable executable and download page
    AliasMatch ^/forms/jinitiator/(..*) "D:\Oradev/jinit/$1"
    # Virtual path for runform.htm (used to run a form for testing purposes)
    AliasMatch ^/forms/html/(..*) "d:\oradev/tools/web/html/$1"
    # Virtual Path for icons
    AliasMatch ^/forms/icons/(..*) "d:\icons/$1"
    ...you can move your files in one of the existing physical directories - e.g: d:/icons - and call them with the following:
    Web.show_Document('/forms/icons/document.pdf','_blank');But you can also add your own virtual/physical directory:
    # Virtual Path for documents
    AliasMatch ^/forms/documents/(..*) "d:\documents/$1"
    ...with the following code:
    Web.show_Document('/forms/documents/document.pdf','_blank');Francois

  • CSV FILE UPLOAD

    DEAR ALL,
    I am facing one problem while uploading csv file.
    I have 2 csv files.
    i use the function module
    CALL FUNCTION 'KCD_CSV_FILE_TO_INTERN_CONVERT'
        EXPORTING
          i_filename      = L_FILENAME "'C:\Temp\Book1.csv'
          i_separator     = ','
        TABLES
          e_intern        = l_intern
        EXCEPTIONS
          upload_csv      = 1
          upload_filetype = 2.
      LOOP AT l_intern.
        MOVE : l_intern-col TO v_index.
        ASSIGN COMPONENT v_index OF STRUCTURE W_ERQ TO <fs>.
        MOVE : l_intern-value TO <fs>.
        AT END OF row.
          APPEND W_ERQ TO GT_ERQ.
          CLEAR W_ERQ.
        ENDAT.
      ENDLOOP.
    It is working working for one file. while uploading another file it is showing simble (") " with mail ids"
    In the sence i have my csv files one column mail id of approver. But it is fetching from csv file mail-ids but starting mail with " and end of mail it showing the simble ".
    HOw should i over come this problem
    Thanks
    margani

    If your CSV has tabulator as separetor, this code will fill your internal table without any other code.
    DATA: l_filename TYPE string.
      l_filename = p_file.
      REFRESH wt_input.
    CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          filename                      = l_filename
         filetype                      = 'ASC'
         has_field_separator           = 'X'
         dat_mode                      = 'X'
        TABLES
          data_tab                      = wt_input[]
       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
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.

  • Csv file uploading for database table creation

    Hi there,
    I'm in the process of making an application that will be able to upload a csv file and create a table based on the same file. As of now, I have managed to make my application upload a csv file into the database. My problem now is to transfer the data in the csv into a table. If there is a function that can do this, please let me know. But as of now, I have tried all that I can but in vain. I would appreciate any assistance rendered as to how I can go about this.
    Kind regards,
    Lusuntha

    hai Lusuntha ,
    Go to search forum and type "upload within html db".here u will find the required information ,as well as the code.go for each topic in the search result.

  • CSV file upload into interal table with unicode system.

    Hi everyone.
    I have a problem. I made a sample program to upload CSV file to server memory;iternal table i mean. if csv file has numeric and english data, it works well. but it's not work when i made a csv file with Korean. my code is below. how can i do??
    DATA: FILEUPLOAD TYPE REF TO CL_HTMLB_FILEUPLOAD.
    DATA: CONTENT_LENGTH TYPE STRING,
          FILE_CONTENT TYPE XSTRING ,
          FILE_LENGTH TYPE STRING ,
          FILE_MIME_TYPE TYPE STRING ,
          FILE_NAME TYPE STRING .
    DATA: CONTENT TYPE STRING.
    FILEUPLOAD ?= CL_HTMLB_MANAGER=>GET_DATA(
                           REQUEST = REQUEST
                           ID      = 'file1'
                           NAME    = 'fileUpload' ).
    FILE_NAME      = FILEUPLOAD->FILE_NAME.
    FILE_MIME_TYPE = FILEUPLOAD->FILE_CONTENT_TYPE.
    FILE_LENGTH    = FILEUPLOAD->FILE_LENGTH.
    FILE_CONTENT   = FILEUPLOAD->FILE_CONTENT.
    data: conv type ref to CL_ABAP_CONV_IN_CE .
    data: tmp type string.
    data: cnt type i.
        CONV = CL_ABAP_CONV_IN_CE=>CREATE( INPUT = FILE_CONTENT
                                           ENCODING = 'UTF-8' ).
        CONV->READ( EXPORTING N = cnt
                    IMPORTING DATA = CONTENT ).
        tmp = content.

    Hi,
    Pls check threads like
    File Download / Upload Question
    Eddy
    PS. Reward the useful answers and you will get <a href="http:///people/baris.buyuktanir2/blog/2007/04/04/point-for-points-reward-yourself">one point</a> yourself!

  • .CSV Files upload

    I have all my contacts in a web based database that can export .csv files. I want to upload this data to a fifth generation Ipod for contact management purposes.
    Does the ipod have a csv upload feature?
    How can do this?
    what is the easiest method? I would prefer not to upload to outlook b/f uploading to Ipod

    Welcome to Apple Discussions!
    Hm...Windows-formatted iPods take contacts from Outlook Express. Try taking your .csv files to Outlook for it to convert (I believe it will, however I'm not sure because I don't have it because I hate Outlook :P). If after Outlook takes your contacts, put your iPod into Disk Mode and when your plug your iPod in for synching with iTunes, you will see a folder that comes up with Contacts, Notes, and Calendar (the default name for the iPod drive is Drive F:, I believe). Take your contacts then from Outlook Express to your Contacts folder, that should work if all of the above goes smoothly.
    Be careful with Disk Mode though, it confuses a lot of people
    Hope this helps!
    rjl
    307

  • Schedule a CSV File upload?

    I have a requirement from a customer to upload a Exchance Rate Currency file into an Oracle 10g database table at a specific time every day. I can see how to upload the table, but I need to know if there is a way to schedule this to happen daily and if there are instructions on this process.
    I am using the utillity in Enterprise Manager to upload data from a CSV file.
    Thanks,
    Winston

    Thanks guys. I am actually running 10g on a Windows
    platform, so I can't follow the guidelines for that.
    HJ, can you expand a little on your suggestion? That
    doesn't mean anything to me. I'm fairly new to the
    Oracle DB.
    Thanks,
    WinstonOK, so write a batch file (to invoke sqlldr) and schedule it through the Windows scheduler. Same principal as writing a shell script and scheduling with cron.

Maybe you are looking for