capekerop.blogg.se

Putexcel stata 12 version
Putexcel stata 12 version












  1. #PUTEXCEL STATA 12 VERSION HOW TO#
  2. #PUTEXCEL STATA 12 VERSION UPDATE#
  3. #PUTEXCEL STATA 12 VERSION SERIES#

#PUTEXCEL STATA 12 VERSION HOW TO#

Next time, I will focus on writing different kinds of expressions to Excel.In this regular expressions (regex) tutorial, we're going to be learning how to match patterns of text. You can find a complete list of formatting options in the putexcel entry in the Stata Programming Reference Manual. These are some of the formatting options that you can specify with putexcel. putexcel C2 = "Column 3", hcenter bold border(bottom, double) putexcel B2 = "Column 2", hcenter bold border(bottom, double) putexcel A2 = "Column 1", hcenter bold border(bottom, double) putexcel A1:C1 = "Column Header", merge hcenter bold border(bottom) For example, I might wish to create a column header by merging several cells, create column titles with a double border on the bottom of each cell, and add some data to my table. These formatting options can be combined to customize the layout of my table. putexcel A1:C1 = "Merge A1 through C1", merge I might like to merge cells to create a title for several columns. putexcel D4 = "Solid Red", fpattern(solid, red) putexcel D4 = "Left Thick Green", border(left, thick, green)Įxample 8: Specifying the fill pattern for cellsĪnd I can use the fpattern option to shade individual cells. putexcel C3 = "Top Medium Blue ", border(top, medium, blue) putexcel B2 = "All Thin Red", border(all, thin, red) putexcel A1 = "Bottom Double Black", border(bottom, double, black) I can use the border() option to add borders to individual cells. putexcel C3 = "Rotate 90", txtrotate(90)Įxample 7: Specifying the border location, style, and colorĬell borders and shading can be used to create an overall look to a table. I can rotate an expression using the txtrotate() option. Sometimes, it is easier to show labels in a table by rotating them. putexcel C1 = "Times New Roman", font(timesnewroman, 14, green) putexcel B1 = "Courier", font(courier, 16, blue) putexcel A1 = "Ariel", font(ariel, 20, red) I can even specify the font, the font size, and the color using the font() option. I can also write expressions using bold, italics, underline, or strikeout text.Įxample 5: Specifying the font, the font size, and the color putexcel C1 = "Bottom Right", bottom rightĮxample 4: Bold, italics, underline, and strikeout text putexcel B1 = "Centered", vcenter hcenter For example, I can specify the horizontal and vertical alignment of the expressions in the cells. I can format expressions by adding options to putexcel. Next, let’s write an simple expression to Table1.Įxample 3: Specifying text alignment in cells All subsequent putexcel commands will write to Sheet1 in the file Table1.xlsx until you specify a different table with putexcel set.Įxample 2: Writing a simple expression to Excel You must set a destination file before you run any other putexcel commands. Note: file will be replaced when the first putexcel command is issued putexcel set Table1.xlsx, sheet(Sheet1) replace Let’s begin by setting the destination file and sheet for our Excel table It would be too distracting to list the differences between the putexcel syntax before and after Stata 14.2, so I am only going to show you the syntax as of Stata 14.2. You will need to set your Stata version to 13.1 to run the examples in Kevin’s blog posts. You may recall that Kevin Crow has written two blog posts about putexcel titled Export tables to Excel and Retaining an Excel cell’s format when using putexcel.

#PUTEXCEL STATA 12 VERSION UPDATE#

We have made some improvements to putexcel in Stata 14.2, so you will want to update your copy of Stata to run the examples below.

putexcel stata 12 version

Today I am going to focus on formatting expressions and cells. I’ll even show you how to write your own version of ExcelTable.

#PUTEXCEL STATA 12 VERSION SERIES#

I can’t possibly anticipate all the different layouts you might want, so I am going to write a series of blog posts to show you how to create your own Excel tables. Or maybe you would like to write a do-file that creates a similar table. My guess is that many of you would like to have a similar program but you might prefer a different layout. So I wrote a program called ExcelTable for my own use that creates Excel tables like the one in the screenshot. The Excel table table.xlsx was created successfullyĪnd get an Excel table that looks like this: ExcelTable race, cont(age height weight) cat(sex diabetes) For a long time, I have wanted to type a Stata command like this,














Putexcel stata 12 version