cell

Format cell if cell contains date less than today

匿名 (未验证) 提交于 2019-12-03 03:06:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am trying to get conditional formatting for a row for when a cell in that row contains a date less than or equal to today (yesterday, today, last week etc) I have tried =IF($W$4,TODAY()) which works for if the cell equals today's date, but I cannot figure out how to make it work for if cell is equal to today or less than today. Also, is it possible to now copy this conditional formatting to work for every cell in the column, but only affect the cell's row? Also with this the cell stays hightlighted if it is left blank, is this right? like

Single click edit in WPF DataGrid

匿名 (未验证) 提交于 2019-12-03 03:06:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I want the user to be able to put the cell into editing mode and highlight the row the cell is contained in with a single click. By default, this is double click. How do I override or implement this? I've searched on google, and the codeplex answer doesn't work for me. I'm pretty new to WPF and coding in general, so a simple answer is better. 回答1: Here is how I resolved this issue: This DataGrid is bound to a CollectionViewSource (Containing dummy Person objects). The magic happens there : DataGridCell.Selected="DataGrid_GotFocus" . I simply

Rotate text / Vertical text in itextsharp

匿名 (未验证) 提交于 2019-12-03 03:06:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I need vertical text or just a way to rotate a ColumnText in ITextSharp. (It needs to be absolute position) Until now i have tried a lot of diffrent solution, but with no luck. Here is a couple of tries: 1. _cb.SetFontAndSize(BaseFont.CreateFont(), 12f); _cb.ShowTextAligned(Element.ALIGN_CENTER, "Hello World", 50, 50, 90); 2. var vt = new VerticalText(_cb); vt.SetVerticalLayout(50, 50, 400, 8, 30); vt.AddText(new Chunk("asdasd",_sf.ChildBackPageTextOneFont())); vt.Go(); 3. System.Drawing.Drawing2D.Matrix foo = new System.Drawing.Drawing2D

Self-Sizing (Dynamic Height) Cells in iOS 8 - Possible without Custom UITableViewCell?

匿名 (未验证) 提交于 2019-12-03 03:06:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Is it possible to self-size a UITableViewCell in iOS 8 without creating a Custom UITableViewCell? I thought that the standard UITableViewCell types (UITableViewCellStyleDefault, UITableViewCellStyleSubtitle, UITableViewCellStyleValue1, UITableViewCellStyleValue2) had built in auto layout constraints. This is confirmed by the fact that the constraints for non-custom cells cannot be changed in Storyboard. But when I use a non-custom cell of type UITableViewCellStyleValue1, set it up in Storyboard, set numberOfRows for textLabel and

Why does my Java custom cell renderer not show highlighting when the row/cell is selected?

匿名 (未验证) 提交于 2019-12-03 03:05:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have a custom cell renderer for a cell to do a word wrap so more content can be read. Here is the code: import java.awt.Color; import java.awt.Component; import java.awt.Insets; import javax.swing.JTable; import javax.swing.JTextArea; import javax.swing.table.TableCellRenderer; public class TextWrapCellRenderer extends JTextArea implements TableCellRenderer { private static final long serialVersionUID = 1L; public TextWrapCellRenderer() { setLineWrap(true); setWrapStyleWord(true); setMargin(new Insets(0, 5, 0, 5)); setSelectionColor(Color

Epplus use Excel Styles like Hyperlink

匿名 (未验证) 提交于 2019-12-03 03:05:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am trying to style some cells, I'd like to use the standard "Hyperlink" Style, but I am unable to find it. here is my best guess code, but the Workbook does not contain a style other than "standard" var hLinkStyle = (from s in dataSheet.Workbook.Styles.NamedStyles where s.Name == "Hyperlink" select s).FirstOrDefault(); hyperlinkCell.StyleName = hLinkStyle.Name; 回答1: Try to create a named style and set it to the cell as follows: // string link = "your link". // worksheet is your worksheet reference. var namedStyle = worksheet.Workbook

Error could not dequeue a view of kind UICollectionElementKindCell

匿名 (未验证) 提交于 2019-12-03 03:04:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Taking first plunge with collection views and am running into this error: Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'could not dequeue a view of kind: UICollectionElementKindCell with identifier Cell - must register a nib or a class for the identifier or connect a prototype cell in a storyboard' The code is very simple, as shown below. I can't for the life of me figure out what it is that I'm missing. - (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath

How do I add an extra separator to the top of a UITableView?

匿名 (未验证) 提交于 2019-12-03 03:04:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I have a view for the iPhone that is basically split in two, with an informational display in the top half, and a UITableView for selecting actions in the bottom half. The problem is that there is no border or separator above the first cell in the UITableView, so the first item in the list looks funny. How can I add an extra separator at the top of the table, to separate it from the display area above it? Here's the code to build the cells - it's pretty straightforward. The overall layout is handled in a xib. - ( UITableViewCell *)

Fill cell array with elements based on the indices MATLAB

匿名 (未验证) 提交于 2019-12-03 03:04:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have a n*m cell array Cell_In: a b * * * * c * * d * * * f * --> represents empty string (''). Here is what I need: a b a b a b c b c d c d c f For a particular column I need to fill the empty cell with the previous non-empty cell until another non-empty cell is found. Following is the code what I wrote. b = ~cellfun(@isempty,a); c = [find(b(:,1) == 1);size(a,1)+1]; e = diff(c); d = [find(b(:,2) == 1);size(a,1)+1]; f = diff(d); s1 = ''; s2 = ''; for i = 1:length(e) s1 = [s1,repmat(a(c(i),1),1,e(i))]; end for i = 1:length(f) s2 = [s2,repmat

PHPEXCEL get formatted date as is visible in excel file

匿名 (未验证) 提交于 2019-12-03 03:04:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am trying to import a excel file using PhpExcel lib for all other fields the getValue() function works but when it encounters a field with format date as set in ms-excel2013 the date field in exel file is in format d-m-Y like 16-11-2014 but when I try to import it's value the getValue() returns 11-16-14 which when passed to strtotime further returns false in turn causing the date('Y-m-d',strtotime($date)) to return 1970-01-01 . I searched whole of web and stackoverflow but none solution fixed my problem. In excel file i see the date as 16