Is there any way to export/save a gtsummary object (like tbl_strata or a tbl_svysummary) into a doc or csv document? - gtsummary

I want to use the table obteined by using gtsummary components.
For example, I'd like to use a tbl_svysummary object as a new dataframe. Also, beign able to report a tbl_strata in a word document would be great. Nontheless, I donĀ“t know it this is actually possible.

Related

Loop through database ANYLOGIC

In my model I want to loop through the database which contains multiple columns (see example) by an event. The idea behind it is that I want to create dynamic events based on the rows in the database.
But I've no clue how to iterate through a database in anylogic and also was not able to find an example of a loop with a database.
The dummycode of my problem would look something like this:
For order in orderdatabase:
Create order based on (order.name, order.quantity, order.arrivaltime, order.deliverylocation)
Where order in the loop is every row of the database, and the value on which the creation is based based on the different column values of that specific row.
Can somebody give me a simple example of how to create such a loop for this specific problem.
Thanks in advance.
Use the database query wizard:
put your cursor into a code field
this will allow you to open the database wizard
select what you need (in your case, you want the "iterate over returned rows and do something" option
Click ok
adjust the dummy code to make it do what you want
For details and examples, check the example models and the AnyLogic help, explaining all options in detail.

How to create a HTML table with a custom number of columns in Powershell

I'm familiar with Powershell but have just learned how to convert to HTML to create reports. I have an array with one property that holds a lot of objects. When converting to HTML, instead of creating just one column that runs down the page with all the objects, I want to create 3 or 4 columns and spread the objects across the columns.
I know Powershell automatically creates the tables based on the object properties so not sure how to proceed and Google doesn't yield any helpful info.
TIA.

How to relate a column to the row rather than the other way in anylogic

I have created a database in anylogic. Previously, I have related the information in the row to the columnn, i.e. there is a component in the row, and its properties are in the columns, and have put this in a function. Now I want to make the component the column and the properties, but don't know how to make it all relate. Below is the code I've written for the former:
site = selectFrom(parameters) .where(parameters.box_number.eq(boxNumber)) .where(parameters.site.eq(site)) .firstResult(parameters.site);
So box_number is the component and site is one of the properties. With this method, site is a column, but I want it to be a row.
You should use the SELECT WHERE SQL syntax, see https://help.anylogic.com/index.jsp?topic=%2Fcom.anylogic.help%2Fhtml%2Fconnectivity%2Fquerying.html&resultof=%22%73%65%6c%65%63%74%22%20%22%77%68%65%72%65%22%20
You can filter and load data in any format. Also, best use the database query wizard to help:

Conditional Formatting in Microsoft Word 2016 Table Cells

I have a table and it is for a test plan I am doing for a project, there is a column at the end of the table where the 2 values in it will be Y (passed the criteria) or N (didn't pass the criteria)
Is there a way in Microsoft Word to change the colour of the text on the row with the value of N at the end, this makes it easier to spot the places where it failed the criteria.
I know you can do the find and replace method but I was wondering if there was a way to do this automatically so when the user enters N it changes the whole row to red and when they enter Y it changes it back to normal.
Here is a screenshot of my table:
A point in the right direction to an article I may have missed or a direct answer would be greatly appreciated, thanks.
I see four ways you can go from here:
Either you create a VBA Macro which automatically jumps in once you change something in your document and updates the table. This will force you to save the document with the file extension *.docm.
Or you create two styles (of type character) which automatically format the table Cell and it's content as you like. You would need to guide the users how to use those styles by advising them or you could also provide separate buttons within your document to call a macro which would apply those styles. Also here the macro option would force you to save the document with the file extension *.docm.
Another option would be to use a Word document with an OLE Microsoft Excel object. The drawback is the users would need to know how to use this embedded Excel object.
The third way you could go is to use Microsoft Excel and use the inbuilt Conditional Formatting of Excel. If you need the results to be in a Word document you would still be able to copy the table back to Word.
Note:
I especially mention the document file extension *.docm because this can cause your document to appear dangerous when you send it by email. Perform a google search to read more about Microsoft Office documents containing macros.

How do you create a two-column Word document where each column is a different file?

Is it possible to create a two-column Word document, where each column shows a different file?
I would like to print out a text in different languages, original and translation, side by side to learn a foreign language, but I cannot figure out how to do it.
Create a table with two columns, paste one document in the left column, the other in the right.
When you want to automate something in Word, one technique is to use Word's macro recorder to record yourself doing the same task (or a similar one). That results in VBA code that's pretty close to what you need. Take that code and adapt it for use in your program.