I have a Gridview which has some FontAwesome checkmarks (fa-check) the problem is when I export the Grid to Excel these fields come out as blank. More so, at runtime the cell.Text value is the Empty string ("") so I cannot effectively replace the text with a "YES" for instance.
I'm using the usual code for exporting (Stringwriter, HtmlTextWriter and then looping for each
Gridview Row and TableCell therein)
Any clues on how to replace this at export time?
PS: I could have duplicate/hidden columns with YES NO instead of the Font Awesome icons, then hide and unhide them at export time, but I'm looking for a more graceful way.
Any help appreciated
Please check out:
https://www.nuget.org/packages/EPPlus/
It is a more graceful way to export to XLS and has many ways to customize your export.
In addition .. since FA Fonts are font based ... including a link to your resource file so excel can find the font your trying to render?
Related
I have a weppart page I'm editing in SharePoint Web. I have an excel workbook display webpart in a column. The webpart has a summary toolbar for open in excel, download, and such. The toolbar has multiple buttons displayed to the user that I want to remove. Foe example, the first one is Edit in Excel.
I added a content editor for CSS and used
.cui-ctl-mdedium,
.cui-ctl-mdediumlabel
Display:None;
I've tried multiple classes, targeting just the webpart, using !important and such with no luck. Any thoughts?
Element/Class info
Are you sure you've written that selector correctly? The class name is actually .cui-ctl-mediumlabel ... you've written it with a "1". Not much to do in this case without code or anything to actually try it out. Have you tried solving your problem with your browser's dev tools adding rules?
I am using ReportViewer control to export data as word document(doc). when I download the file it appears like this:
There is problem with Arabic font as you see, English words are okay. Do you know how to fix this issue ?
Select the Table > from Localization > choose LayoutDirection to "RTL"
I am working on a test case editor, which is something like a excel sheet.
Where i need a excel sheet cells to enter data, combobox in excel sheet cells & few buttons, text editor.
Something like shown in these links.
http://www.theirishpenguin.com/assets/images/disc_jockey_list.png
http://qt-project.org/doc/qt-5.0/qtwidgets/images/spreadsheet-demo.png
http://multimedia-and-graphics.softlandmark.com/images/screenshots/QuickTime_MOV_QT_MP4_Converter_229513.gif
Please suggest should i use :--
QT spreadsheet or QT treewidget or QT modelview ?
What will be the right class to use, to get maximum flexibility with my editor ?
Base your editor on QTableWidget - as the name suggests, it shows a table/grid, and looks very closely like Excel.
There is already an example spreadsheet application that comes from the Qt team.
I'm reading an Excel file (.xlsx) and outputting XML with PHP in a manner like this:
$cellVal = $objPHPExcel->getSheetByName($Sh)->getCellByColumnAndRow($tCol,$i)->getValue();
echo '<data_text>'.$cellVal.'</data_text>';
etc..
Everything is working perfectly, except when there's some styling -- italics, or bold, or both -- in a cell: the styling gets lost. Is there a clever way to retain it?
Things might be easier if it'd be the styling of a whole cell. But what if there's mixed styles?
Try using the cell's getFormattedValue() method rather than getValue() if you want the number masking.
Other styles such as italic, bold, etc can be returned by method calls to read the styling for a cell; but you need to decide how you're going to store that information in your own XML. For mixed styles, PHPExcel will let you parse the RichText Object that it returns; but again, you need to decide on how it should be stored in your own XML.
I am exporting a grid from my ASP.NET application. One of the columns in the grid (called Notes) has string that has html in it. For example, the Notes column can contain <Head> html tag. However when I export it to excel, I am not being able to see the string <Head>.
Tehnically speaking this is not export to excel, but you send a html with a wrong headers to trick browser to open this content with excel, among the other things downside of this approach is that you don't have control over process of exporting.
Use proper exporting and export data, not some UI view. There is a excellent and free .NET solutions for creating excel files :
NPOI (xls) or / and EPPlus (xlsx)