sdkbase64cognosspreadsheetml

cognosdotnet_10_2 and spreadsheetML output


Trying to get spreadsheetML output from Cognos using cognosdotnet_10_2.dll.

"Outputpage" data is base64 encoded string. I'm trying to get something readable out of base64string to plainText variable. I have tried with basically most of the basic encodings and result doesn't look like markup.

var encodedTextBytes = Convert.FromBase64String(((asynchDetailReportOutput)res.details[i]).outputPages[0]);

plainText = Encoding.UTF8.GetString(encodedTextBytes);

Does anyone have ideas what to try next?


Solution

  • encodedTextBytes = Convert.FromBase64String(((asynchDetailReportOutput)res.details[i]).outputPages[0]);

    FileStream fs = new FileStream(outputPath, FileMode.Create); fs.Write(encodedTextBytes, 0, encodedTextBytes.Length);