Somewhat new to SPSS and wondering if its possible to export into an excel file a data map containing the variable label, value label and corresponding value at a row level. I know you can download a data map via Display Data File Information but the variable label is a header rather than displayed on each row.
Example...
“what is your gender”,”male”,”1”
“what is your gender”,”female”,”2”
"primary car brand","Chevy","1"
"primary car brand","Buick","2"
"primary car brand","Fiat","3"
"primary car brand","Toyota","4"
"primary car brand","Kia","5"
Any assistance is appreciated.
See whether the CODEBOOK (Analyze > Reports > Codebook) procedure is more to your liking. Any Viewer table can be exported to Excel either via File > Export or using OMS. Or the exact format of the display you showed can be produced as a table using Python programmability. Details if you need to go that way.
In many use cases, the APPLY DICTIONARY (Data > Copy Data Properties) does what's needed without the need to create an external listing.
Related
I have a budget spreadsheet for simple money transactions. One of the columns is the transaction category (e.g. Grocery, Auto Supplies, Insurance, Entertainment, etc.)
Rather than spell out, let's say, Insurance, in a given cell, I would like a list of possible values to appear, so that I can select one of the values (e.g., Insurance) and have Excel put that value in the cell for me. That way I make sure that Insurance is spelled the same each time I use it.
Is there an easy way to set this up in my workbook, preferably without getting into VBA coding?
You can create a dropdown lists in Excel. What I found from this video:
"
Select the cells that you want to contain the lists. On the ribbon, click the DATA tab, and click Data Validation. In the dialog, set Allow to List. Click in Source. In this example, we are using a comma-delimited list. The text or numbers we type in the Source field are separated by commas. And click OK. The cells now have a drop-down list.
"
I have a Google Sheets file I use to enter data on different properties.
Each row in this file represents a single property.
If a certain property is of interest, I would like generate a report for it.
I need a functionality that will extract all data fields from a single row, and insert them in a new file (google sheets or preferably a Google Docs file) with a pre built format that would present the data nicely like a report.
Thanking you in advance
Avi
Here is a very preliminary answer, to see if this is the right direction.
See my sample sheet.
This lets you select, in C3, which address you want a report on. The fields shown in green change as you select a different address. All of the report fields could be modified like this - you just need to point to which column in the Properties database contains the values.
Is this roughly what you were looking to achieve?
Basically, I'm using SPSS and have a variable named AREA that includes different major counties in California. Within this variable there is a value label for "Other" and I want to be able to relabel the data to go in their respective county. I have an excel sheet with all the zip codes that fall into those "Other" counties and do have a zip code data in the file as well. There are 400+ zip codes so I'm trying to see if there is an easy alternative to having to manually type in each zipcode into syntax to recode those values.
I've tried seeing if there was a way to reference the excel workbook, but have come up empty handed.
Any guidance or approaches to this problem would be appreciated!
The data in excel has unique zipcodes with corresponding Area value in cell to the right. In the data set there may be multiple instances of each zipcode.
I have an application that will load a CSV file containing two columns. At program load I need to have the first column as items in a combo edit control. Once the user selects (or enters a value) I need to populate a label with the value from the second column. My thought was to use an in memory data set, FDMemTable which would be loaded at form create. Then once the user selects, or enters an item, I would run a query to pull the description. I've tried but have been unsuccessful with the simple loading of the combo edit.
Is this the best way to achieve the desired results, and is there samples similar to what I'm looking to do?
Read the file.
Parse it into an array of name/value pairs.
Populate the combo drop down list with the names.
When the combo's selection is changed to a new index, read the value from the array using that index. Update the label.
Database tables and queries seem somewhat over the top for a single simple task like this.
I have created a master-detail relation using ClientDataSets (Service & Addons). The Services are displayed in a DBLookupComboBox (cboServices) and once a service is selected the Addons are displayed in DBGrid (grdMain).
The Addons has a checkbox to indicate the Addon is selected, a name field, a quantities field that the user can change, a unit price field and a total price field.
I have created a OnQuantityChange method to update the total price using the unit price and quantity but how do I get the actual data from the row to do the updating? How do I reference the various fields in order to do something like the following:
grdMain.GetActiveRow.Column['TotalPrice'] :=
grdMain.GetActiveRow.Column['UnitPrice'] * grdMain.GetActiveRow.Column['Quantity'];
You can do that easily using calculated fields. I suggest you look at the following article for a detailed example with client dataset. Just search the article for calculated fields, you will find what you need.
TClientDataset example