I have about 100 or so columns with multiple conditional formats applied to each column that I need to copy from one excel document to another. I've tried solutions from the Format Painter, to Paste Special, each failing to actually copy the conditional formats over. I hope I'm doing it wrong, as it would mean an easy fix for an otherwise, extremely long process (again).
Is there any way to copy conditional formats from one workbook to another? I don't need to worry about copying over equations or cell values, just the formats.
Paste special > Formats would carry over the conditional formatting.
Try copying (Ctrl+C) and then paste special (Alt+E+S) and select Formats
You could copy the worksheet with the complex conditional formatting that you like, so you have a new copy with the desired behavior. And then simply copy the new values you'd like from your new workbook that doesn't have conditional formatting yet and paste–special–values those numbers. Or paste–special–value–formulas, as the desired case may be.
Related
I am exporting data from SAP Hybris.
The data I am importing also has semicolons (;).
In the exported data I see the delimiter is ; This is preventing me from splitting the data and do my work. Is there a way to change this delimiter to something else ?
I understand this can be achieved by changing the "csv.fieldseparator" property, but that would affect everywhere and I can't afford that in production.. Any suggestions would be appreciated
Go to backoffice.
Search export.
In the advanced configurations set your new delimiter. By default,
it is semi-colon (;).
[![enter image description here][4]][4][![enter image description here][5]][5]I have a PDF that has tabular data that runs over 50+ pages, i want to extract this table into an excel file using Automation Anywhere. (i am using community version of AA 11.3). I watched videos of the PDF integration command but haven't had any success trying this for tabular data.
Requesting assistance.
Thanks.
I am afraid that your case will be quite challenging... and the main reason for that are the values that contains multiple lines. You can still achieve what you need, and with good performance, but the code itself will not be pretty. You will also be facing challanges with Automation Anywhere, since it does not really provide the right tools to do such a thing and you may need to resort to scripting (VBScripts) or Metabots.
Solution 1
This one will try to use purely text extraction and Regular expressions. Mainly standard functionality, nothing too "dirty".
First you need to realise how do the exported data look like. You can see that you can export to Plain or Structured.
The Plain one is not useful at all as the data is all over the place, without any clear pattern.
The Structured one is much better as the data structure resembles the data from the original document. From looking at the data you can make these observations:
Each row contains 5 columns
All columns are always filled (at least in the visible sample set)
The last two columns can serve as a pattern "anchor" (identifier), because they contain a clear pattern (a number followed by minimum of two spaces followed by a dollar sign and another number)
Rows with data are separated by a blank row
The text columns may contain a multiline value, which will duplicate the rows (this one thing makes it especially tricky)
First wou need to ensure that the Structured data contain only the table, nothing else. You can probably use the Before-After string command for that.
Then you need to check if you can reliably identify the character width of every column. You can try this for yourself if you copy the text into Excel, use the Text to Columns with the Fixed Width option and try to play around with the sliders
The you need to try to find a way how to reliably identify each row and prepare it for the Split command in AA. For that you need to have a delimiter. But since each data row can actually consists of multiple text rows, you need to create a delimiter of your own. I used the Replace function with Regular Expression option and replace a specific pattern for a delimiter (pipe). See here.
Now that you have added a custom delimiter, you can use the Split command to add each row into a list and loop through it.
Because each data row may consists of several rows, you will need to use Split again, this time use the [ENTER] as delimiter. Now you need to loop through each of the text line of a single data line and use the Substring function to extract data based on column width and concatenate them to a single value that you store somewhere else.
All in all, a painful process.
Solution 2
This may not be applicable, but it's worth a try - open the PDF in Microsoft Word. It will give you a warning, ignore it. Word will attempt to open the document and, if you're lucky, it will recognise your table as a table. If it works, it will make the data extraction much easier an you will be able to use Macros/VBA or even simple Copy&Paste. I tried it on a random PDF of my own and it works quite well.
Currently, pasting 112,359,1003 into Google Sheets automatically converts the value to 1123591003.
This prevents me from applying the Split text to columns option as there are no commas left to split by.
Note that my number format is set to the following (rather than being Automatic):
Selecting the Plain text option prevents the commas from being truncated but also prevents me from being able to use the inserted data in formulas.
The workaround for this is undesirable when inserting large amounts of data: select cells that you expect to occupy, set to Plain Text, paste data, set to back to desired number format.
How do I disable the automatic interpretation by Google Spreadsheet of the commas in my pasted numeric values?
You can not paste it in any number format, because of the nature of numerical format types. It will parse it into an actual number and physically store it in this format. Using plaintext type, like you are, is the way to go for this.
However, there are some options to perform these tasks in a slightly different way;
- you might be able to use CSV-import functionality, which prevents having to change types for a sheet.
- you can use int() function to parse the plaintext value into an int. (and combine this with lookup functions).
TEXT formatting:
Use ' to prepend the number. It'll be stored as text regardless of actual formatting.
Select the column and set formatting as `plain text.
In both the above cases, You can multiply the resulting text by 1 *1 to use in any formula as a number.
NUMBER formatting:
Keep Number formatting with ,/Automatic.
Here, though split text to columns might not work, You can use TEXT() or TO_TEXT()
=ARRAYFORMULA(SPLIT(TO_TEXT(A1:A5),","))
I have recently started i18n my django project, and I have .po files. However in my templates, I have done things suboptimaly. I have just copied the local variable name for something that appears a lot. So I have near-duplicates in .po file, like %(num)s messages and %(num_messages)s messages and %d messages. I should have written them all the same way, so that there is only one translation.
Is there any way/software that can read my .po file and tell me these messages that I should merge?
I am afraid I do not know any tool that has such functionality built in. What you could try to do instead is use your favourite reg-ex aware text editor and Excel:
1) Paste the content of your po file into column A of a new spreadsheet
2) Open the content of your po file in your favourite reg-ex aware text editor and try to reduce all long variables to their shortest variant: in your example you could replace %\([^\)]+\)s by %d. Or replace all variables by some string that does not occur anywhere else, like RORYS_PLACEHOLDER.
3) Paste the content of your po file with normalized or no more variables into column B of the spreadsheet.
4) Set a filter for strings that start with msgid, then let Excel highlight duplicate values in column B. (Home > Conditional Formatting > Highlight Cell Rules > Duplicate Values in Excel 2013)
Of course your po file may be too complex for this approach, but it is worth a try.
I'm exporting data from a CxDBGrid to an Excel file.
I'm able to create the file and copy data in it, but I'm having real trouble with the column formatting. Since I'm pulling the data from a DB I'd like the spreadsheet to reflect the type: NUMBER, VARCHAR2,DATE and so on.
I visually created a macro, went to look for the VBA code, and replicated it in the Delphi project:
sheet.Columns[K+2].NumberFormat := '0,000'; //Number
sheet.Columns[K+2].NumberFormat := '#'; //Text
sheet.Columns[K+2].NumberFormat := 'm/d/yyyy'; //Date
Number formatting works ok most of the times, but the other two don't.
When I open the generated file, the text columns show up as type "Custom" and every cell displays "-64". If I go to edit a cell, the correct value is actually there.
Date is another issue: the DB's format is dd/mm/yyyy and if I feed it to Excel as-is, it gets all messed up. I tried setting the correct format, but then Excel doesn't recognize it.
Any clues?
I'm also setting column width. That works flawlessly.
The problem is that the assigned values are Unicode strings. Try this:
sheet.Columns[K+2].NumberFormat := AnsiChar('#');
sheet.Columns[K+2].NumberFormat := AnsiString('m/d/yyyy');
You haven't said "how you are doing things manually" which means people have to completely guess what you're doing. So here's my wild guess:
If I assume you're using the Express Spreadsheet component from Developer Express
I have estensive experience with this component. It does not support arbitrary numeric formats. It supports a "money" format (0.00) with exactly two decimal places. It does not support three or one, or any other number of decimal places.
If so, this is a known by-design issue in the Express spreadsheet.
If by manually you mean that "sheet" as you show above is an OLE object and you're communicating via OLE Automation to Excel itself, then you should be formatting CELLS either individually or as a range, and not column objects. I am not sure how column object formats would ever override the cell values, if they do at all. The formatting of cells is generally a cell by cell matter, and must be dealt with as such.
If you really want this to work properly you won't use Excel via OLE automation, you'll get a proper Excel XLS format capable writing library. I was quite sure that you could get proper results directly from the CX (DevEx) db grid, but I would ask on their forums, not here. With a regular DB Grid, I'd just use TJvDBGridExcelExport which comes in the Jedi JVCL, and which works with the regular VCL DB Grid.