Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi developers,
I would like to download excel file (or use data in it) from sharepoint.
I'm using the component tRestClient and the connection is working, so, how do get to the next steep ?
Thanks for your answers !
You can use tFileFetch component to download the files from Sharepoint,
Here is an article about it
https://community.talend.com/s/article/How-to-download-a-file-from-SharePoint-using-tFileFetch-eq7eb
Then, use tFileInputExcel component to read the downloaded excel file from the local directory.
Thanks Achen, but, I have already tried and I have error :
juil. 25, 2023 8:27:36 AM org.apache.commons.httpclient.auth.AuthChallengeProcessor selectAuthScheme
INFOS: ntlm authentication scheme selected
juil. 25, 2023 8:27:36 AM org.apache.commons.httpclient.HttpMethodDirector authenticate
GRAVE: Credentials cannot be used for NTLM authentication: org.apache.commons.httpclient.UsernamePasswordCredentials
org.apache.commons.httpclient.auth.InvalidCredentialsException: Credentials cannot be used for NTLM authentication: org.apache.commons.httpclient.UsernamePasswordCredentials
at org.apache.commons.httpclient.auth.NTLMScheme.authenticate(NTLMScheme.java:331)
at org.apache.commons.httpclient.HttpMethodDirector.authenticateHost(HttpMethodDirector.java:281)
at org.apache.commons.httpclient.HttpMethodDirector.authenticate(HttpMethodDirector.java:233)
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:169)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:396)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:324)
at she_crm_purchasing.a000_load_sql_0_1.A000_LOAD_SQL.tFileFetch_1Process(A000_LOAD_SQL.java:705)
at she_crm_purchasing.a000_load_sql_0_1.A000_LOAD_SQL.runJobInTOS(A000_LOAD_SQL.java:2124)
at she_crm_purchasing.a000_load_sql_0_1.A000_LOAD_SQL.main(A000_LOAD_SQL.java:1721)
juil. 25, 2023 8:27:36 AM org.apache.commons.httpclient.HttpMethodDirector processWWWAuthChallenge
INFOS: Failure authenticating with NTLM <any realm>@inshare.grp.collab.group.safran:443
Exception in component tFileFetch_1 (A000_LOAD_SQL)
java.lang.Exception: Method failed: HTTP/1.1 401 Unauthorized
at she_crm_purchasing.a000_load_sql_0_1.A000_LOAD_SQL.tFileFetch_1Process(A000_LOAD_SQL.java:709)
at she_crm_purchasing.a000_load_sql_0_1.A000_LOAD_SQL.runJobInTOS(A000_LOAD_SQL.java:2124)
at she_crm_purchasing.a000_load_sql_0_1.A000_LOAD_SQL.main(A000_LOAD_SQL.java:1721)
[FATAL] 08:27:36 she_crm_purchasing.a000_load_sql_0_1.A000_LOAD_SQL- tFileFetch_1 Method failed: HTTP/1.1 401 Unauthorized
java.lang.Exception: Method failed: HTTP/1.1 401 Unauthorized
at she_crm_purchasing.a000_load_sql_0_1.A000_LOAD_SQL.tFileFetch_1Process(A000_LOAD_SQL.java:709) [classes/:?]
at she_crm_purchasing.a000_load_sql_0_1.A000_LOAD_SQL.runJobInTOS(A000_LOAD_SQL.java:2124) [classes/:?]
at she_crm_purchasing.a000_load_sql_0_1.A000_LOAD_SQL.main(A000_LOAD_SQL.java:1721) [classes/:?]
[statistics] disconnected
Hello @Mateo Drouillard ,
Seems you check the button 'Enable NTLM Credentials' for tFileFetch regarding to your job log which cause the issue.
As a test, please un-check it as the below to re-try?
i didn't check the box ...
Someone had downloaded the file from sharepoing using tFetchFile or tHttpRequest, please refer to the post