chris31389
chris31389

Reputation: 9356

Is it possible to display a table in skype from bot framework?

I'm building a chatbot with MS bot framework and i've found that the text displayed by the bot is defaulted to be interpretated as markdown.

Here is the markdown:

#### Chris Butler Ltd
* A Point
* A Point

|Name|Value|
|---|---:|
|Status|Active|
|Balance|£0.00|
|Credit Limit|£0.00|
|Available Credit|£0.00|

The emulator displays a markdown table perfectly

Markdown Table in Emulator

When you view it in skype:

enter image description here

I'm surprised to see that skype has actually added some hyphens (-)!

Does anyone know how to display the table so that skype understands it as a table?

Upvotes: 1

Views: 4442

Answers (1)

Eric Dahlvang
Eric Dahlvang

Reputation: 8292

What you have displayed is actually how skype interprets markdown tables: https://docs.botframework.com/en-us/channel-inspector/channels/Skype?f=Markdown&e=example1

Tables: If you are communicating with a channel which supports fixed width fonts or HTML you can use standard table markdown, but because many channels (such as SMS) do not have a known display width and/or have variable width fonts it is not possible to render a table properly on all channels.

So, in answer to your question:

Does anyone know how to display the table so that skype understands it as a table?

What you have is correct, and skype is already interpreting it as a table. Skype just doesn't do a very good job of it.


On a related note: there's also a TextFormat property on the reply object, that can be set to xml (Skype Only) see here: https://docs.botframework.com/en-us/csharp/builder/sdkreference/activities.html#textformat This will not fix the table issue you're experiencing either, but might provide more options.

Upvotes: 1

Related Questions