Web Player Issues Loading Text Files Workaround

Here is a quick workaround for loading files into Spotfire analyses published via the web player. Sometimes network drives and online sources can throw Spotfire Web Player for a loop, giving you the error that the data table cannot be found.

If don’t necessarily have the capacity to fix the server yourself or if you are pressed for time, you may consider using a data function to load the TXT or CSV files into Spotfire. You will need TIBCO Statistics Server in order to accomplish this.

Consider the script below:

  • import = read.table(“//server/file.txt”, sep=”\t”, header = TRUE)

This one-line R script will import a tab delimited text file into your analysis. To get this working on the web player a few more settings need to be set:

  • In the Edit Script dialog, ensure that Allow Caching is turned on.
  • In the Edit Parameters dialog, ensure that Refresh Automatically is turned on.

That’s it!

Some caveats, R takes columns with spaces in them and refactors them to periods. For example “Column 1” becomes Column.1. This can be changed with a transformation:

Select all the affected columns and, instead of using the presets functions, use the following:

Here is the expression for you below:

  • Substitute([%C],”.”,” “)

Interesting to see the % notation is consistent throughout all the transformations.

Let me know if you have any questions.

Leave a Comment

Your email address will not be published. Required fields are marked *