Jump to content

file import Prompts - iron python


Rasheed Bello

Recommended Posts

I have used the following code below with the iron python script to import a file into spotfire. Problem is it keeps prompting me to choose columns everytime i close and open the spotfire project.

 

How do i ensure it's a one-time import only and disable prompts on opening the file.

 

Thanks

 

Rash

 

from Spotfire.Dxp.Data import *

 

from Spotfire.Dxp.Data.Import import *

filePath=r"C:UsersyrwCSVprac.csv"

 

#specify any settings for the file

 

settings= TextDataReaderSettings()

settings.Separator=","

dataSource=TextFileDataSource(filePath,settings)

dataManager=Document.Data

 

#datasource name and datasource to add table

 

dataManager.Tables.Add("DATAtable210",dataSource)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...