Jump to content

Exporting to an Excel file


Manoj Chaurasia

Recommended Posts

Hi,

 

I've tried exporting data from Spotfire to an Excel file. Spotfire created a simple table listing the data that are in my database.

 

Question is, is Spotfire capable of exporting a cross table to an excel file Because that is what I need. I need to create, for example a cross table through Spotfie, then I shall export the created table to an excel file.

 

Regards,

Ben

Link to comment
Share on other sites

Hi Ben,

 

You have to do the following things at your end to make the Script trusted:-

 

 

Edit the text area by right click on the the Scipt button.

Select the Button & Right Click & select the "Edit Control" Option.

Now a new window will pop- up at your screen. Select the Script & click on Edit button.

Now a new window will pop up then simply click on "OK button" without doing anything.

 

 

Now you can see that the button is activated) & it is ready to use.

 

Regards

Manoj Singh

Link to comment
Share on other sites

Hi Manoj,

 

Another problem here, when I've tried to do what you told me on the window where I have to select the script under the Image option it says:

 

To use Script action controls you need to make sure that:

- You are a part of a group with the license Author Scripts (TIBCO Spotfire Extensions) enabled.

 

If this has something to do about having a licensed Spotfire I guess there it can't be helped I only have the trial version of Spotfire.

 

Regards,

Ben

Link to comment
Share on other sites

  • 1 year later...

Hi Ben,

 

I have created a script & it is working fine at my end. following is the Script:-

 

from Spotfire.Dxp.Data.Export import DataWriterTypeIdentifiers

from System.IO import File

writer = Document.Data.CreateDataWriter(DataWriterTypeIdentifiers.ExcelXlsDataWriter)

filtering = Document.ActiveFilteringSelectionReference.GetSelection(table).AsIndexSet()

stream = File.OpenWrite("C:\SpotfireExport.xls")

names = []

for col in table.Columns:

names.append(col.Name)

writer.Write(stream, table, filtering, names)

stream.Close()

 

& also use Name of Script Parameter- table,Type- Data table & Select data table- name of your data table.

 

Regards

Manoj Singh

Link to comment
Share on other sites

  • 1 year later...
  • 3 months later...
  • 1 year later...
  • 7 months later...
  • 3 months later...

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