Questions tagged [formatting]

1

votes
0

answer
326

Views

Convert a string in the format dd-mm-yyyy into a date in angular 4

How to convert a string in the format dd-mm-yyyy into a date object in angular 4 expression. Example: Test date : {{testDate | date :'dd-MM-yyyy'}} If testDate = '2005/01/21' then date pipe is working fine. But for testDate = '21-01-2005' , it showing invalid date.
Abinash
1

votes
1

answer
596

Views

Excel 2013: Condition Formatting with “IF(AND)” and “ISBLANK” and Data Validation Values

I have a formatted table and would like to use conditional formatting to shade in cells in a column (G) based on the following conditions: Value in column (D) must say 'Pending Decommission'. The value is from a data validation list. If value does not match, do nothing. If the above is true, then ch...
Thomas Nguyen
1

votes
1

answer
82

Views

Custom Format decimal number as N Week N Day

I have a table of dates that i reference in another table that shows the number of weeks & days elapsed since TODAY().I use the DOLLARFR() function to get a decimal value that represents the weeks & days elapsed. =DOLLARFR((TODAY()-M8)/7,7) Where M8 = '22-Dec-2017' & TODAY() = '29-Dec-2017'. This gi...
sifar786
1

votes
0

answer
62

Views

How to do you make colored bullet points with python-docx?

I am wondering if it is possible to set the bullet point color in python-docx (style= List Bullet) without changing the font color? I know its possible using word but I can't find the attribute to do this via code. Thanks
HollyPocket27
1

votes
0

answer
30

Views

Conditional colorscale - programmatically

I am struggling to recreate logic behind Excel's three-colors scale for conditional formatting. This is the second option displayed when you choose Home-->Conditional Formatting -->Color Scale (red-yellow-green). I have started with this subroutine: Sub Tricolore(Rng As Range) Dim cl As Range Dim d...
MarcinSzaleniec
1

votes
1

answer
1k

Views

Conditional Formatting using Index/Match

I am working on a workbook that has a number of worksheets, and I am trying to apply conditional formatting for a cell one sheet based on the value of a cell in another. I noticed the following phenomenon, for which I don't have a good explanation: In one sheet, I have an array of random numbers bet...
AEStudent51345
1

votes
1

answer
246

Views

Excel VBA loop through cells to find Conditional Formatted cells and copy paste on other sheet

My issue: I want to loop through a range, and whenever it finds a conditional formatted cell, it should copy the cell to the left to the cell to the right of it. And then afterwards paste it into an other worksheet. My code loops through the cells easily, but doesn't copy the information, and paste...
Patrick S
1

votes
2

answer
26

Views

Excel condtional formatting - multipile conditions and search references

I would be very grateful for help with this conditional formatting problem as I'm terrible with excel but learning. I have a large data set which I want to count specific OPCS codes (Classification of Interventions and Procedures). The issue is, that in some rows there are multiple OPCS codes that...
Jimmyjimjams
1

votes
0

answer
49

Views

Use Of Different Locale Values for Different Methods

When I use nextDouble() method of Scanner class like try (Scanner input = new Scanner(Paths.get('input.txt'))) { double d = input.nextDouble(); System.out.printf(Locale.getDefault(),'%.2f',d); } catch (NoSuchElementException | IllegalStateException | IOException e) { e.printStackTrace(); } nextDoubl...
Neophyte
1

votes
0

answer
54

Views

clang-format align postfix types in declarations

Is there any way to align postfix types using clang-format? I have the below options set but it seems to have no effect on declarations in typescript (postfix types) From the Clang 6 documentation: AlignConsecutiveAssignments (bool) If true, aligns consecutive assignments. This will align the assig...
Kyle Abramowitz
1

votes
1

answer
34

Views

formatting combobox elements

In my database serial-numbers are stored as an Integer. I want to represent these numbers in a Access-frontend combobox with a different formation: '121212345' --> '12.12.12345' When a number is chosen it should be stored as an Integer again. I already tried to populate the combobox by myself with s...
daly
1

votes
1

answer
386

Views

Getting caller class name for Formatter [Java Logging with File Handler]

I want to add a FileHandler to my logger. And I am also creating a new Formatter(java.util.logging.Formatter) for my FileHandler In the format method https://docs.oracle.com/javase/7/docs/api/java/util/logging/Formatter.html#format(java.util.logging.LogRecord), is it possible to get the class which...
Ian Lim
1

votes
0

answer
366

Views

AlaSql Rows and Columns formatting when exporting to excel (.xls)

I am using AlaSql version 0.4.2. I am exporting to excel through following way : var mystyle = { headers: true, sheetid: 'Counter Correction', }; //Create XLS format using alasql.js file. var excelHistoricalFileName = 'HistoricalDataExport_' + $rootScope.Park_Name + '_' + $rootScope.turbineName + '...
user1643830
1

votes
0

answer
386

Views

Preserving formatting to Excel using Shiny downloadhandler

I wrote a code that formats to green if the index > 120 and to red if the index is < 80. It works when I view it in web browser. See below. But when I download the data using downloadHandler, the formatting is gone. How I preserve the formatting? Thank you. My code: server.R: function(input, output...
Ketty
1

votes
1

answer
76

Views

SSRS dynamic positioning of tablix

I have four tablix in my report. Tablix 1 always has data. Tablix 2-4 are hidden if they do not have data. If Tablix 1 has data, Tablix 2 does not have data and Tablix 3-4 have data there is a gap in the report where Tablix 2 would have been. How can I close the gap when a tablix is hidden because...
user974061
1

votes
1

answer
65

Views

How to format and truncate numbers when converting XML to XLS (using XSL)

I am converting an XML to Excel XLS with XSL. How can I format the number to be 3 decimal, and truncate ? So, if the number in XML is 101.746789, I want the number in Excel to be 101.746. When I use the below XSL,the number in Excel becomes 101.747. Thank you.
faujong
1

votes
1

answer
91

Views

Bold text while pasting in Gmail composer

I have to copy some text from a plain text file into Gmail's mail composer and make some parts of that text bold. I can obviously boldface those specific parts manually after pasting it to the composer. But is there a way to do this automatically such that when I copy that content to the Gmail compo...
Sagar
9

votes
4

answer
1.6k

Views

str.format(list) with negative index doesn't work in Python

I use a negative index in replacement fields to output a formatted list,but it raises a TypeError.The codes are as follows: >>> a=[1,2,3] >>> a[2] 3 >>> a[-1] 3 >>> 'The last:{0[2]}'.format(a) 'The last:3' >>> 'The last:{0[-1]}'.format(a) Traceback (most recent call last): File '', line 1, in TypeE...
Explogit
1

votes
1

answer
116

Views

Create Tuples out of JSON File

I've been working on parsing a JSON file to make it easier to work with in PostgreSQL and was wondering what the best method would be to parse a JSON dictionary into tuples? For example the lines look like this for the two variables: The first 'attributes': {'RestaurantsTableService': false, 'GoodFo...
mrsquid
1

votes
0

answer
47

Views

Not getting Xml portion in formatted form?

I am trying to create a xml file which is perfectly formatted. It include somethings Element getting replaced later on. The output is not perfectly formatted. xEvent contains a whole xml template form like string Here is the most of the relevant code string c2 = ']]>'; string c = ''; XmlDocument x...
Breathing
1

votes
1

answer
799

Views

formatting the dollar sign and the decimal alignment

Hi I'm new to python and have been playing around on python for a while but I still can't get the dollar sign and the decimal to align. cost=pack*price discount= cost * dis #the percent discount amountdue = discount + cost #how much they owe print(format('Total $', '13'), format(cost,'6.2f')) print...
Jenny
1

votes
2

answer
42

Views

column manipulation with different files

I have a really annoying problem: I have 2 files that I am using, and I need to replace the columns of the original file while keeping its formatting intact. This is the format: HETATM 1 CA LIG 1 38.925 -1.038 -22.754 1.00 0.00 Ca HETATM 2 CA LIG 1 38.509 -0....
mrsphd
1

votes
1

answer
452

Views

Get started with the formatting in Monaco Editor

I am trying to add a formatting to a custom language in Monaco Editor. It seems that we could use monaco.languages.registerDocumentFormattingEditProvider. As an example, I have made a working plunker. Now I want to add a very simple formatting rule to the whole document: add one newline after each...
SoftTimur
1

votes
1

answer
35

Views

Reduce JavaScript Objects into Array of Formatted Objects

I have an array of objects in the format {type: number, sub_type: number} I need to sort them into an array of objects formatted like this { type_id: (type from at least one object in array above), sub_types: [ (all sub types from objects in array above that match this type) ] } This is what I came...
Kurt Petrek
1

votes
0

answer
33

Views

JAWS with table-formatted content

I have a WPF chat application (based on RichTextBox), where each message in transcript is wrapped in its' own table element. When JAWS is used, it reads message text, and then says 'Table'. Is there a way to prevent JAWS to say 'Table' after reading each message? Chat transcript view:
Evil_Kot
1

votes
0

answer
288

Views

User Defined Function in Conditional formatting Excel VBA

I have the following User defined function in the conditional formatting formula criteria: =hasTrigger() And this is the actual function: Function hasTrigger() as variant Dim rngCaller As Range Set rngCaller = Application.Caller If rngCaller.Value='A' then hasTrigger=1 End Function Moreover, I have...
Thanasis
1

votes
0

answer
115

Views

Convert US number format to EU

Is it possoble to convert US number format (comma as thousand separator) to EU (dot as thousand separator) with formula or function, like NUMBERVALUE(A2,',','.') for EU to US? (e.g. 5,000.15 to 5.000,15) I know that there is an option to use or not use system separator (advanced options), but in tha...
Jovica
1

votes
1

answer
1.9k

Views

How to Use Icon Set Conditional Formatting and how to use IF formula based on different criteria In Excel 2016?

So I want to have 'Red Green and Yellow' Icon Set Conditional Formatting based on the one cell value. Criterias' for color Scheme : We have two columns with values - current number and operational number The Green Color Circle (from conditional formatting Icon set) should show in separate third colu...
Sahil K
1

votes
1

answer
916

Views

Teradata row not delivered (trget): The format or data contains a bad character

I am using SAS 9.4 to pull the data from Teradata tables and I have the following error Teradata row not delivered (trget): The format or data contains a bad character Proc sql; Connect to Teradata(user=......) Create table table1 as Select * from connection to Teradata (Select Text1, Text2 Fr...
ckp
1

votes
0

answer
847

Views

Python openpyxl data validation along with formatting

I am using openpyxl to created a .xlsx file to aggregate some data. One of the columns is Status and needs to be data-validated to make sure it only contains one of several options. I did this part just fine: validator = openpyxl.worksheet.datavalidation.DataValidation(type = 'list', formula1 = (''...
Rares Dima
1

votes
0

answer
65

Views

matplotlib bar plot spacings

I'm trying to plot 3 bars per value of N. The data is: N=['A','B','C','D','E','F'] SF = (0.87,9.4,49,110,820,1752) IRT = (0.34,25,210,487,2861,5541) IRTO = (0.5,33,271,568,3031,6314) These numbers of w (width), y_pos and figsize are basically just trial and error until it looks decent enough to my e...
Esteban
1

votes
0

answer
149

Views

Matlab table font size

I've written a matlab file that outputs a table of values. The code itself works exactly as I want it to, but when I publish to pdf, the table format lays the values of the last column on top of first column. I'd like to make the font size smaller so that my table can look nice. I found some rela...
Matt Robbins
1

votes
3

answer
273

Views

Conditional Formatting with Time through Formula

I'm trying to highlight the time based on the folowing rules If the time is lower than 7:30 be closer to red Otherwise if the time is closer to 8:05 get close to green In this sheet: I guess it's easier to explain with the following illustration: You should get the basic idea of what I'm trying to a...
Rawrplus
1

votes
1

answer
67

Views

Conditional Formating

I'm new to google sheets and I like to set conditional formating to an specific column. Starting on Row 8, Column D I want to set the back ground color based on that is on the cell If cell content like 'pass' then background color should be green (183,225,205) If cell content like 'fail' then backgr...
Edil
1

votes
2

answer
114

Views

How to avoid / work around PHP wordwrap removing spaces

For an iCal generator that I'm working on, I need to ensure that each 75 characters, a string is broken like this: $string = 'This is a long text. I use this text to demonstrate the PHP wordwrap function.'; $newstring = wordwrap($string, 75, '\r\n ', TRUE); echo($newstring); Result: This is a long t...
user40974
1

votes
2

answer
395

Views

How to get the Currency formatter with decimal and grouping separator in swift using ISOCode

Decimal and Grouping separator are not correct: func setAmountString (amountValue: Int, isoCodeStr: String) { let formatter = NumberFormatter() formatter.currencyCode = isoCodeStr formatter.numberStyle = NumberFormatter.Style.currencyISOCode if let formatterStr: String = formatter.string(from: NSNum...
Lavanya v gowda
1

votes
1

answer
421

Views

Adding Percentage Number Format in PHP Excel

When I set format of a cell as %, it automatically multiplies the value with 100 & shows the value. So 94 becomes 9400%. I want to apply % format on a column but want to keep the values same as before. I just want % sign to be shown along with the value. My Value should be 94% . To achieve this, I u...
Umar Adil
1

votes
1

answer
167

Views

Reformatting long date to a different language than the one used in Excel

I want to change 27/02/2018 into a long date in English February 27,2018 using a macro. Recording the steps, I found out that the format for this looks like this : '[$-en-US]mmmm d, yyyy;@' So I did this : cuteDate = Format(DateValue('27/02/2018'), '[$-en-US]mmmm dd, yyyy;@') But wen I run the macr...
Takichiii
1

votes
0

answer
27

Views

Format a number to a maximum width and variable precision

I would like to format a number (integer or float) to a string with the following requirements: The total width must be n The precision should be variable but minimal (between 0 and p) Uses leading space if necessary With n, a parameter given by the developer (me), and p the number of decimal exclud...
Slagt
1

votes
2

answer
40

Views

making header print once only if true

I want the header to print once if the loop gets results but not print if it doesn't. I got the tip of setting the header to a True or False from here but I am trying to use it in a loop now which doesn't seem to be working. header = False if header==True: print('{:10} {:10}'.format('Room#','Fee'))...
selfteaching

View additional questions