I have a custom website in which I am generating a csv file. I want the
file to be saved to a SP document library after the file is creating. My
attempt at this gives me the following error "URI Formats are not supported".
The web server where this website is located does not have SP installed.
Can someone help me tweak my code? Here is what I am currently using:
Protected Sub btnindesign_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnindesign.Click
'Declare variables
Dim profile As String
Dim username As String
Dim Csv As New Exporter()
Dim filename As String
'Dim filename2 As String
Dim filepath As String
'Assign variables
profile = Session("profile")
username = Session("user")
filename = "Resume.csv"
filepath = "http://sharepoint/dsi/preconservices/internal/resumes/" +
username + "/csv/"
'Check for filepath
filepath = filepath + username + "/csv/"
''If no user name folder exists, create a new one
If Directory.Exists(filepath) = False Then
Directory.CreateDirectory(filepath)
End If
If filename.IndexOfAny(System.IO.Path.GetInvalidFileNameChars()) = -1
Then
Using CsvWriter As New StreamWriter(filepath)
CsvWriter.Write(Csv.CsvFromDatatable(GetResumeData(username,
profile)))
End Using
End If
End Sub