Results 1 to 3 of 3
  1. #1
    pe1826 is offline Novice
    Windows 10 Access 2016
    Join Date
    Nov 2021
    Posts
    2

    Importing a csv file stored in SharePoint 365

    Hi all,



    We are in the process of moving our on premise file shares into SharePoint 365.

    We have a number of access databases which import data from csv files and have therefore been testing that the import function will still work as it does currently.

    We are using Application.FileDialog along with the DoCmd.TransferText functions to search for the the file and import it.

    We are also using a third party tool to map drives to various document libraries on SharePoint.

    However, each time we run the code we are getting the error that we cannot import an html file. I have set the FileDialog . InitialName to the mapped drive F:\ and I have even hardcoded the file path and file into DoCmd.TransferText, but each time we get the import error.

    I'm fearing that this is another one of those SharePoint\Access limitations!

    The code I am currently using is listed below and any suggestions would be much appreciated.

    Thank you
    Paul

    Code:
        Dim fd As FileDialog
        Dim fileName As String
        
        Set fd = Application.FileDialog(msoFileDialogOpen)
        
        With fd
            'Existing filters must be cleared before adding new:
            .Filters.Clear
            .Filters.Add "Text Files", "*.csv"
            'InitialFileName can be used to set initial directory for file dialog:
            .InitialFileName = "F:\"
        End With
        
        fd.Show 'Show file select dialog
        
      
        fileName = fd.SelectedItems(1)
        
       
        DoCmd.TransferText acImportDelim, "PagesCreatedSpec", "Pages_Created", fileName, True

  2. #2
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,859
    Have you inspected any of the files?
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  3. #3
    pe1826 is offline Novice
    Windows 10 Access 2016
    Join Date
    Nov 2021
    Posts
    2

    Importing a csv file stored in SharePoint 365

    Quote Originally Posted by Welshgasman View Post
    Have you inspected any of the files?
    Hi Welshgasman, I'm not sure what you mean? Can you elaborate please?

    Paul

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 2
    Last Post: 05-21-2021, 01:56 AM
  2. Importing Data in an Excel file on Sharepoint
    By mindbender in forum Import/Export Data
    Replies: 1
    Last Post: 08-16-2017, 10:04 AM
  3. Number format in tables stored on Sharepoint as lists
    By tim.cassey in forum SharePoint
    Replies: 0
    Last Post: 02-16-2016, 08:08 PM
  4. Importing Excel file stored on sharepoint
    By tezza79 in forum Import/Export Data
    Replies: 0
    Last Post: 01-27-2015, 01:29 AM
  5. Importing file directly from a Sharepoint file (not list)
    By jstoler in forum Import/Export Data
    Replies: 1
    Last Post: 06-28-2013, 01:44 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums