Jump to content

Unable to import data from CSV or excel file


Richard Vietje

Recommended Posts

I am using a spotfire file and import data tables in CSV or excel format.

This was never a problem, but a few days ago I got the error message indicated below.

The file to be opened is accessible when directly opened from the location were it is stored. but spotfire keeps refusing to open the file and is generating this error.

What could be the cause of this error

Error message: Unable to import data. See the details for more information.

ImportException at Spotfire.Dxp.Forms:

Unable to open file Z:GFR_Model_2013R20_MoReS0_ReferenceModel2P_HManalysisGFR2013_HM_2018dec.csv (HRESULT: 80131500)

Stack Trace:

at Spotfire.Dxp.Forms.Data.Import.DataSourceFactoryService.CreateConfiguredDataSourceFromFile(String filePath)

at Spotfire.Dxp.Forms.Data.Import.DataSourceFactoryService.CreateDataSources(DataSourceType dataSourceType, String errorDialogTitle, String fileOpenDialogTitle, DataSourceFactory dataSourceFactory, String initialDirectory, Boolean showOnDemandButtonInInformationLinkPrompt)

TargetInvocationException at Spotfire.Dxp.Framework:

Exception has been thrown by the target of an invocation. (HRESULT: 80131604)

Stack Trace:

at Spotfire.Dxp.Framework.ApplicationModel.ProgressService.ExecuteWithProgressCancelable(String title, String description, ProgressOperation operation, Boolean showCancelButton)

at Spotfire.Dxp.Forms.Data.Import.DataSourceFactoryService.CreateConfiguredDataSourceFromFile(String filePath)

ImportException at Spotfire.Dxp.Data:

Failed to open data source. (HRESULT: 80131500)

Stack Trace:

at Spotfire.Dxp.Data.DataSource.ConnectWithoutPrompting(IServiceProvider serviceProvider, DataSourcePromptMode promptMode, Boolean updateInternalState, DataLoadSettings loadSettings)

at Spotfire.Dxp.Data.DataSource.Connect(IServiceProvider serviceProvider, DataSourcePromptMode promptMode, Boolean updateInternalState, DataLoadSettings loadSettings)

at Spotfire.Dxp.Data.DataSource.Connect(IServiceProvider serviceProvider, DataSourcePromptMode promptMode)

at Spotfire.Dxp.Forms.Data.Import.DataSourceFactoryService.c__DisplayClass2.b__0()

at Spotfire.Dxp.Forms.Application.FormsProgressService.ProgressThread.DoOperationLoop()

NullReferenceException at System.Windows.Forms:

Object reference not set to an instance of an object. (HRESULT: 80004003)

Stack Trace:

at System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)

at System.Windows.Forms.Control.Invoke(Delegate method, Object[] args)

at System.Windows.Forms.WindowsFormsSynchronizationContext.Send(SendOrPostCallback d, Object state)

at Spotfire.Dxp.Forms.Application.FormsApplicationThread.InvokeOnUIThreadAndTransferTransactionStartPermission(ApplicationInvocation method)

at Spotfire.Dxp.Framework.DocumentModel.ThreadTransactionInfo.InvokeAndTransferCurrentInfo(ApplicationThread invoker, ApplicationInvocation method)

at Spotfire.Dxp.Forms.Application.FormsProgressService.PerformPrompt(Func`1 promptMethod)

at Spotfire.Dxp.Data.Import.TextFileDataSource.ConnectCore(IServiceProvider serviceProvider, DataSourcePromptMode promptMode, DataLoadSettings loadSettings)

at Spotfire.Dxp.Data.DataSource.ConnectWithoutPrompting(IServiceProvider serviceProvider, DataSourcePromptMode promptMode, Boolean updateInternalState, DataLoadSettings loadSettings)

Link to comment
Share on other sites

  • 8 months later...

I see in the stack trace that it is using a local path "Z:GFR_Model_2013R20_MoReS0_ReferenceModel2P_HManalysisGFR2013_HM_2018dec.csv".

Can you try replacing this with the UNC path (\servernamepath)of the file in the data source of the dxp (by replacing the data source), save the file and reopen it

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...