Export Rich Text format Data from Excel to Database

Hi All,

I am a newcomer to this Forum.Please find my scenario and let me know your thought and solution.

1. I have an excel sheet which contain Rich formated Text like Bold / Italics / Different Font size / Font color etc.

2. Import this excel sheet to Database with format and user can do the formating change from UI also

3. After Formating chnage , User can export the Database data to excel and which reflect the formated data.

Regards

Abdul

Hi,


Well, you may use Aspose.Cells APIs to format data (e.g apply number formattings, set cell text applying rich formatting with font options (i.e font color, font name, size, etc.), now you may save it to Excel file formats, PDF, HTML etc. But if you need to view the formatted data, you have to use corresponding viewer to open specific format, e.g
XLS, XLSX --> MS Excel or Excel Viewer
PDF --> Adobe Acrobat etc.
HTML -> Browser e.g IE, FireForx, Chrome

How could you save the richly formatted data directly into a database e.g MS Access, MS SQL Server etc. I don’t think you may store the data with its attributes (rich formatting) as you can only save pure data into the tables of a database. This is similar as you save your data to some text formats, e.g CSV, TXT, Tab Delimited where only pure data is stored. You may confirm this in MS Excel by saving data to some data sources. By the way, I think you may try to save to SpreadsheetML format, which is a kind of Excel’s XML file format.

Let me know if you still have any confusion.

Thank you.

Hi Amjad,

Thanks your reply and appreciated your Hep. And I am designing a table with two colums and one colum will hold actual data and other colum will hold the meta data like Font style.

But my question is, Can we fetch the style and data from Input Excel file seperately using ASPOSE tool.

Egs: My Input Cell Text is "This is My string" and I need to save these data in to table like

PureData : This is My string

MetaData : Font1.Bold (0,3), Font2.Italics(8,9),Font3.Underline(11,16).

Regards

Abdul.

Hi,


Well, I think you may use Cell.HtmlString attribute, it can get/set Formattings in HTML tags if it suits your needs. You may use the property to retreive any cell’s formatting string in HTML and use it for your purpose.

Other way is to use Cell.GetStyle() method to get the Style object, now you may use different properties to know its formttings.


Thank you.