导出HTML内容以打开Office应用程序时出现问题. [英] Problem when export an HTML content to open office application.

查看:74
本文介绍了导出HTML内容以打开Office应用程序时出现问题.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好.

当我尝试导出HTML内容以打开Office应用程序时遇到问题.
我正在C#中使用ASP.Net.
我有一个数据表,其中一列是平均小时数".
它以字符串类型保存假定为"08:50"的值.
这意味着员工的平均工作时间为08小时50分钟.
将HTML导出到开放式Office应用程序中后,
它显示为上午08:50:00.
我认为开放办公室的默认时间格式设置为HH:MM:SS AM/PM.
当我在开放办公室中将格式更改为仅HH:MM时,则列中的值正确显示.
但是在Microsoft Office(Excel)应用程序中,没关系.

假设我的HTML内容如下-

Hello All.

I am facing a problem when I am trying to export an HTML content to open office application.
I am using ASP.Net with C#.
I have a datatable and one of it''s column is say "Average Hours".
It holds the value suppose as "08:50" as string type.
That means average hours for an employee is 08 hours and 50 minutes.
When the HTML is exported into open office application,
it is showing as 08:50:00 AM.
I think default time format for open office is set as HH:MM:SS AM/PM.
When I am changing the format to only HH:MM in open office, then values in column is showing properly.
But in Microsoft Office (Excel) application, it is all right.

Suppose my HTML content is as follows--

<table>
	<tr>
            <td>08:50
            </td>
        </tr>
</table>   




有什么办法可以通过我的代码来解决此问题,而无需每次在开放式办公室中更改格式.在C#中.
请帮帮我.
非常感谢.




Is there any way to manage this problem through my code with out changing the format every time in open office. in C#.
Please help me.
Thanks a lot.

推荐答案

您可以在CodeProject ^ ]
You can try HTML Report Engine at CodeProject The HTML Report Engine[^]


这篇关于导出HTML内容以打开Office应用程序时出现问题.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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