Loading SharePoint Data Programattically


Does anyone know how to load data from SharePoint in Spotfire using Iron Python ?

I need to load this dynamically as data sets in sharepoints keep on evolving. I was trying a workaround by mapping sharepoint

drive locally but still the following code is failing because of authentication issues. 


from Spotfire.Dxp.Data import DataTableSaveSettings

import clr
import sys


#from System.Windows.Forms import OpenFileDialog

clr.AddReferenceByName('Microsoft.Office.Interop.Excel, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c')

from Microsoft.Office.Interop import Excel

#filename="C:\GCD\GCD Dashboard Schema\Risk Management\RiskRegisterMaster.xlsx"

filename= "M:\80 Project Services\Risk Management\WND Phase 2 Maadi Hub Risk Register.xlsx"
#Microsoft Excel application
excelApp = Excel.ApplicationClass()   
excelApp.Visible = False

# Perform the data import 
# Create data source
ds = Document.Data.CreateFileDataSource(filename)

dataTable = Document.Data.Tables["GCD_Cost_Data"]

print "success"

#newTable = Document.Data.Tables.Add("Sequence", ds)



Did this solution work?

T. Ung - Oct 11, 2017 - 7:44am


Try giving the Everyone group access to this shared folder and then running the python script.

Please share the error you receive if the script fails.

Sayali Patil - Aug 08, 2017 - 5:14pm
+ Add a Comment

(1) Answer