The solution is to use another part of the API to export the content of the cell. This is done with the GetRows function.
https://docs.tibco.com/pub/doc_remote/spotfire/7.6.0/doc/api/?topic=html/M_Spotfire_Dxp_Data_DataTable_GetRows_1.htmAPI Reference Example:
DataTable table;
DataValueCursor<int> cursor1 = DataValueCursor.Create<int>(table.Columns["Column1"]);
DataValueCursor<double> cursor2 = DataValueCursor.CreateNumeric(table.Columns["Column2"]);
DataValueCursor<string> cursor3 = DataValueCursor.CreateFormatted(table.Columns["Column3"]);
DataSelection selection;
foreach (DataRow row in table.GetRows(selection, cursor1, cursor2, cursor3))
{
int rowIndex = row.Index;
int value1 = cursor1.CurrentValue;
double value2 = cursor2.CurrentValue;
string value3 = cursor3.CurrentValue;
DoSomething(rowIndex, value1, value2, value3);
}
After we have the lists of the values we need to build the final export file using the .NET libraries. We cannot use the Spotfire API for this since the values will then be truncated. The standard StreamWriter class should be fine for this purpose.
https://msdn.microsoft.com/en-us/library/system.io.streamwriter(v=vs.110).aspx