Questions tagged [cell-formatting]
137 questions
29
votes
5 answers
NPOI create cell containing bold and non bold text
I'm using NPOI to output excel from Asp.Net MVC app and works very well with plain text but have now been requested to add formatting and am having problems where I need to have a single cell with bold text followed by non-bold text. e.g.
This text…

Nathan
- 931
- 1
- 12
- 26
16
votes
5 answers
Is there a way to force a DataGridView to fire its CellFormatting event for all cells?
We use the CellFormatting event to colour code cells in various grids all over our application.
We've got some generic code which handles export to Excel (and print) but it does it in Black & White. Now we want to change this and pick up the colour…

hawbsl
- 15,313
- 25
- 73
- 114
13
votes
3 answers
Export the dataGridView to Excel with all the cells format
I have this code that I know that it works fast
CopyAlltoClipboard(dataGridViewControl);
Microsoft.Office.Interop.Excel.Application xlexcel;
Microsoft.Office.Interop.Excel.Workbook xlWorkBook;
Microsoft.Office.Interop.Excel.Worksheet…

Ștefan Blaga
- 404
- 1
- 5
- 22
12
votes
1 answer
Set openpyxl cell format to currency
I'm creating an excel sheet using openpyxl. Some cells represent monetary values. How can I change the format of a cell to be of type "currency", i.e. I want a "€" symbol to be displayed after the number.

Dominic
- 383
- 1
- 3
- 16
7
votes
1 answer
NPOI - How to distinguish datetime-formatted numeric Excel-cells (c#)
Background
I have an Excel-file (xlxs) with a number of datetime and decimals that I want to convert into a two-dimensional string-array. The strings in the array should look exactly as the user has entered them into the excel. To do this I'm using…

user1531921
- 1,372
- 4
- 18
- 36
7
votes
10 answers
cellForRowAtIndexPath: UILabel overlaps after scroll
cellForRowAtIndexPath:
cell.textLabel.text works fine.
UILabel is overlapping after scrolling. Here is the code:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString…

user1107173
- 10,334
- 16
- 72
- 117
5
votes
3 answers
How to format radgrid cell programmatically
I have to format (backcolor, forecolor, font style) a radgrid's cells depending on the value of the cell.
For example
If the value is negative set the fore color of that cell as red.
Can any one please tell me how this can be achieved?
dotnet_learner
4
votes
1 answer
How to add cell color to cell range using Python Pandas ExcelWriter?
I am trying to add a background cell color to a cell range using Python Pandas ExcelWriter. Here is what I have so far:
pivotChartsTab = pd.read_sql(sql4, conn)
import pandas.io.formats.excel
pandas.io.formats.excel.header_style = None
…

user76595
- 357
- 5
- 17
4
votes
3 answers
ngGrid cellFilter and cellTemplate do not work together
I use ngGrid to display my data. I would like to use cellFilter and cellTemplate together for the specific column, but seems they do not work together.
when I use cellFilter or cellTemplate seperately they work perfect. Basically, I would like to…

Mammadj
- 153
- 2
- 8
3
votes
3 answers
CellFormatting event in C# is really slow
I have been struggling with CellFormatting event, it's so slow.
I have a DataGridView something like this:
I have written a function that fires when you click the checkbox in the header and it makes all the check boxes to check in that column.... …

Ehsan
- 4,334
- 7
- 39
- 59
3
votes
0 answers
Custom cell formatting in Excel for continuous values in 4 discretised value ranges
The following initial situation:
I have numerical values in an Excel column. However, I would like to reformat them so that the possible range of values is discretised into 4 sub-ranges and a text is output instead of the concrete value. Only in the…

DevArchitectMaster
- 115
- 6
3
votes
2 answers
Is there any way to format date cell in Excel with Invariant culture like in C#
The problem I am facing is that in a cell of an Excel sheet, a date is written. The cell is formatted with custom-format like:
[$-de]dd/mm/yyyy (dddd)
But only the (dddd) part is processed to give me "Sonntag" (Sunday in German language).
The…

Gouse
- 33
- 3
3
votes
3 answers
Capturing Time Values from an Excel Cell
I am writing an Excel app that will read and write specified values from an Excel file, and display them to the user. However, when I try to read from a cell which has a Number Format or a function typed 'hh:min' (Hour:Min) I cannot obtain that…

msharpp
- 31
- 1
- 2
3
votes
4 answers
How to pre-format a cell to date on Laravel Excel
I am using the package maatwebsite.com/excel for exporting xls files from my app. I want to pre-format the cell to date. Is it possible?
I have formatted the data to date, but I want that the cell would be pre-formatted with date (its default cell…

Jay Marz
- 1,861
- 10
- 34
- 54
3
votes
3 answers
Summing arrays inside cells
I have a code in MATLAB that produces 1000 x 1000 arrays in a loops that runs ten times; to try and save all these loops, I commit these arrays to a cell; Now I have a cell 1 x 10 cell nalled PL, each element being a 1000 x 1000 array; I want to sum…

DRG
- 241
- 1
- 6