如何使用c# - WINFORM将rtf内容导出到Excel工作表中 [英] how to export the rtf content into excel sheet using c# - WINFORM

查看:209
本文介绍了如何使用c# - WINFORM将rtf内容导出到Excel工作表中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我将excel数据导入我的数据库。我想再次将其导出为ex​​cel。导入时我在excel中格式化了很少的列。所以我把它作为rft格式文本存储在db中。对于Ex: - 内容看起来像这样:

({\rtf1\deff0 {\fonttbl {\f0 Times New Roman;} { \ f1 Calibri;}} {\colortbl\red0\green0\blue0; \\\\\ green0 \ blue255;} {\ * \ listoverridetable} {\ buddlesheet {\\\\\ cf0正常;} {\ * \cs1\cf0默认段落字体;} {\ * \cs2 \sbasedon1\cf0行号;} {\ * \cs3 \ ul\cf1超链接;}} \ sectd \\\\\\\\\\\\\\\\\\\\\\\\ pre> 



我能够将文本读作rtf格式并将其存储在db中。但是当我尝试将它导出回excel时,我无法将此rft文本转换为格式化的excel单元格值。



注意:

我正在使用Spire.XLS dll导入和导出。





请帮助我!

解决方案

Hi,

I am importing excel data into my db. And I would like to export that again to excel. While importing I have few columns formatted in excel. So I store it as rft format text in db. For an Ex:- the content looks sth like this:

({\rtf1\deff0{\fonttbl{\f0 Times New Roman;}{\f1 Calibri;}}{\colortbl\red0\green0\blue0 ;\red0\green0\blue255 ;}{\*\listoverridetable}{\stylesheet {\ql\cf0 Normal;}{\*\cs1\cf0 Default Paragraph Font;}{\*\cs2\sbasedon1\cf0 Line Number;}{\*\cs3\ul\cf1 Hyperlink;}}\sectd\pard\plain\ql{\f1\cf0 Who was an american printed the very first step in Moon?}{\cf0 \tab }\par})



I am able to read the text as rtf format and store it in db. But when I try to export it back to excel, I am not able to convert this rft text into formatted excel cell value.

Note:
I am using Spire.XLS dll to import and export.


Kindly help me!

解决方案

这篇关于如何使用c# - WINFORM将rtf内容导出到Excel工作表中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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