Assign RTF/HTML code to Excel cell
I am Working on Microsoft C#.net(windows)
I have a requirement ,
I have an excel file containing formatted text in a cell (ex: text will be bold,italic,color) . I need开发者_JAVA百科 to save the cell content in to the sql database. Then i need to show the saved formatted text from database to a new excel file.
How to assign RTF code and HTML code to Excel cell.
Is there any option available. Please help
Thanks Sandeep
i think you can use openxml to split the data along with cell formart and save in different tables in your db by referencing some id. Lets say sheet 1 has sheetid as 1 and against this sheet id save data in your table and against same sheetid save cell number and style associated like font border fill.
Below Link can be helpful. http://msdn.microsoft.com/en-us/library/documentformat.openxml.spreadsheet.cellformat.aspx
I am writing code for the same will share soon
精彩评论