I am merging many rtf files into a single file for printing. In order to save paper, I would like to have the printout of the merged rtf document in two columns per page.
What is the best way to do this?
I found out a way of doing this.
Load the rtf document into a CRichEditCtrl.
Use the CRichEditCtrl's FormatRange method to format and render the text to different part of the paper; left column and right column in this case.
Related
In my document, I need to generate a table that has merged cells.
simple example
As M2Doc does not support the merge of cells, I have tried two workarounds.
Workaround 1
It consists in creating nested tables inside the second column. I have played with the borders to hide the fact that it is a nested table.
M2Doc template of workaround 1
Unfortunately Word does not handle nested table correctly, as there is no way to garantee the constant width of cells. Which results in columns that don't have a constant width.
illustration of inconsistent column width
Workaround 2
My second workaround was to generate excel tables outside M2Doc, with Python4Capella. And in my M2Doc template, I create references towards the generated tables.
This second workaround would work well if I did not have to display XHTML descriptions in my table. So far, I can only get the markup code in Excel and I have no means to interpret it.
Any idea of how I could implement my table including merged cells with the current capabilities of M2Doc? For example with a dedicated Java service that I would develop? If so, any hint about how this service could be implemented is highly welcome. And so is any idea of strategy!
Thank you
It is possible to create a Java service to merge cells for instance this service.
Also you have Excel services to insert a table from an .xlsx file.
With Python for capella you will have to parse the XHTML from your description to use OpenPyXL formating.
And maybe an other idea could be to use MS Excel itself to do the conversion via a macro or some cell format option.
Suppose I have a CSV file, where the first column of data is a date with format yyyy-MM-dd HH:mm:ss, while the second column is a date with format yyyy-MM-dd HH:mm. How can I import the CSV file into the Weka Explorer such that both attributes have the "date" type?
I understand that in the Weka Explorer's "Preprocess" tab's "Open file ..." dialog, I can select "Invoke options dialog" to customize the data types of the imported attributes:
However, the resulting configuration window only allows me to specify one dateFormat:
How can I solve the problem? Do I have to manually convert the CSV file into an ARFF file by editing the CSV file in a text editor?
The ADAMS framework has the weka.filters.unsupervised.attribute.StringToDate filter that allows the conversion of a range of attributes using a specific date format string. You can wrap multiple of these filters in a weka.filters.MultiFilter to convert all of your various date columns in one go. The MultiFilter would get applied to the initially loaded CSV file, where all the date columns are just string columns.
ADAMS also offers the Weka Investigator, a more powerful tool than the Weka Explorer: multi-session support, multiple files loaded at the same time (you can load train and test files and just select the files from a combobox then), multiple tabs of the same kind (not just a single Classify tab), different types of cross-validation (batched/non-batched), predefined output generators that get applied to evaluations (model, statistics, classifier errors, ...), etc.
Also, for automating all these steps, you can use ADAMS' Flow editor, a workflow engine.
If you don't want to use ADAMS: load the CSV file in the Weka Explorer, save it as ARFF then manually edit the relevant attribute types (see ARFF format) before reloading it in the Weka Explorer.
so, I got 3 xlsx full of data already treated, so I pretty much just got to display the data using the graphs. The problem seems to be, that Powerbi aggregates all numeric data (using: count, sum, etc.) In their community they suggest to create new measures, the thing is, in that case I HAVE TO CREATE A LOT OF MEASURES...Also, I tried to convert the data to text and even so, Powerbi counts it!!!
any help, pls?
There are several ways to tackle this:
When you pull a field into the field well for a visualisation, you can click the drop down in the field well and select "Don't summarize"
in the data model, select the column and on the ribbon select "don't summarize" as the summarization option in the Properties group.
The screenshot shows the field well option on the left and the data model options on the right, one for a numeric and one for a text field.
And, yes, you never want to use the implicit measures, i.e. the automatic calculations that Power BI creates. If you want to keep on top of what is being calculated, create your own measures, and yes, there will be many.
Edit: If by "aggregating" you are referring to the fact that text values will be grouped in a table (you don't see any duplicates), then you need to add a column with unique values to the table so all the duplicates of the text values show up. This can be done in the data source by adding an Index column, then using that Index column in the table and setting it to a very narrow with to make it invisible.
I use SAS EG 6.1 to add sheets to an existing excel file (xlsx). I use a simple proc export with DBMS=xlsx. The data is written to the excelfile succesfully.
However it appears that formatting in Excel is taken from the already existing sheets. There also is a difference between cells that contains numbers vs. cells that contain text. For instance when in the existing sheet i used header 1 cell style, the numbers in the exported worksheets also had this header 1 style.
Screenshot of the existing sheet: Existing Worksheet
Screenshot of the added sheet (wrong formats)
The wrongly formatted added worksheet
I tried the following things:
- add an extra sheet without formatting and place this as first sheet in the workbook. My thought was the exported work sheets then wouldn't have the format either. No succes.
- add an extra sheet without formatting and place this as last sheet in the workbook. My thought was the exported work sheets then wouldn't have the format either. No succes.
2 alternative possible solutions i think of are:
1) using the pcfiles and ranges method. I will try this and post the results.
2) recreate the existing workbook and pray to see different results.
Did anyone have this experience and solved this problem?
update 17-1-2016: added screenshots and tried the procedure with a fresh excel workfile. The latter didn't result in succes.
I'm trying to tidy up a sheet with the following problem, and would appreciate any advice.
My sheet has 7 "master columns" and about 4000 rows. It was compiled by converting a load of PDF documents.
The master columns are made up of merged minor columns, but at various parts of the data, the minor columns that make up each master column are different.
eg The first master column is made up of merged columns A-H for the first 30 rows, but for the next 25 rows it's made up of merged columns A-G etc.
As I said, overall there are still the same 7 master columns from top to bottom, but the merging is different throughout...
Can anyone think of a way to fix this without doing it all manually?
Copy your horrible spreadsheet into Word with Home > Clipboard – Paste, Paste Special, Unformatted Text and replace ^t^t with ^t. Replace All repeatedly, until Word has completed its search of the document and has made 0 replacements. Copy back in to Excel.
This is not tested on your image so there might be some issues – perhaps column misalignments (where even Word’s limited regex may help to add back tabs where suitable). The result should be no merged cells – mind you someone on SE described these along the lines of “A creation of the Devil to test us beyond endurance” (ie best avoided).
Try selecting the full document and click unmerge button from the ribbon.
As per the screen shot you provided, you can select all and unmerge but getting the corresponding fields in order might be challenging.
Try using macros to set combined functionalities in a single or combine key presses