在导出excel文件时,它应该以文本格式导出 [英] while exporting excel file it should export in text format

查看:106
本文介绍了在导出excel文件时,它应该以文本格式导出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用了以下代码,但是它不起作用..
请给我建议答案.

I used the following code but it is not working..
Please suggest me the answer..

StringWriter sw = new StringWriter();
string style = "<style> .textmode { mso-text-format:\@; } </style>";
Response.Write(style);
Response.Output.Write(sw.ToString());



谢谢



thank you

推荐答案

我从未见过为此使用转义字符,因此可能是问题所在(混合中的分号太多或其他).有什么东西会自动插入吗?

尝试用字符本身替换它们:
I''ve never seen escape characters used for that, so that might be the problem (too many semicolons in the mix, or something). Did something insert them automatically?

Try replacing them with the characters themselves:
string style = @"<style> .textmode { mso-text-format:\@; } </style>";


这篇关于在导出excel文件时,它应该以文本格式导出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆