You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. Create a [Google Sheet](https://docs.google.com/spreadsheets):
62
-
- The first row **must** be the header.
63
-
- The following rows are your entries, one entry per row.
64
-
- You may have an *active* column, with which you can enable or disable rows/entries.
65
-
- A Google Sheets demo spreadsheet is available [here](https://docs.google.com/spreadsheets/d/1gSc_7WCmt-HuSLX01-Ev58VsiFuhbpYVo8krbPCvvqA).
63
+
- The first row **must** be the header.
64
+
- The following rows are your entries, one entry per row.
65
+
- You may have an _active_ column, with which you can enable or disable rows/entries.
66
+
- A Google Sheets demo spreadsheet is available [here](https://docs.google.com/spreadsheets/d/1gSc_7WCmt-HuSLX01-Ev58VsiFuhbpYVo8krbPCvvqA).
66
67
2. Share your sheet:
67
-
-[File]→[Publish to the web]→ (Entire Document, Web page) [Publish]
68
-
- Get the *Spreadsheet ID* (i.e. `1gSc_7WCmt-HuSLX01-Ev58VsiFuhbpYVo8krbPCvvqA`): It is part of the Google spreadsheet URL.
69
-
- Get the *Worksheet ID*: The Worksheet IDs are increasing numbers, starting at 1.
68
+
-[File]→[Publish to the web]→ (Entire Document, Web page) [Publish]
69
+
- Get the _Spreadsheet ID_ (i.e. `1gSc_7WCmt-HuSLX01-Ev58VsiFuhbpYVo8krbPCvvqA`): It is part of the Google spreadsheet URL.
70
+
- Get the _Worksheet ID_: The Worksheet IDs are increasing numbers, starting at 1.
70
71
3. Optional: It may be a good idea to enable [2-Step Verification](https://www.google.com/landing/2step/) for your Google account, if you have not done it yet :wink:.
71
72
72
73
### Angular
@@ -114,50 +115,61 @@ The `attributesMapping` maps the Google spreadsheet columns to to your outcome o
114
115
115
116
```typescript
116
117
const attributesMapping = {
117
-
id: 'ID',
118
-
name: 'Name',
119
-
email: 'Email Address',
118
+
id: "ID",
119
+
name: "Name",
120
+
email: "Email Address",
120
121
contact: {
121
-
_prefix: 'Contact',
122
-
street: 'Street',
123
-
streetNumber: 'Street Number',
124
-
zip: 'ZIP',
125
-
city: 'City'
122
+
_prefix: "Contact",
123
+
street: "Street",
124
+
streetNumber: "Street Number",
125
+
zip: "ZIP",
126
+
city: "City",
126
127
},
127
128
skills: {
128
-
_prefix: 'Skill',
129
-
_listField: true
130
-
}
129
+
_prefix: "Skill",
130
+
_listField: true,
131
+
},
131
132
};
132
133
```
133
134
134
-
For example, the Google spreadsheet column *Email Address* is mapped to the outcome object attribute `email`.
135
+
For example, the Google spreadsheet column _Email Address_ is mapped to the outcome object attribute `email`.
135
136
136
137
#### Nested objects
137
138
138
139
`contact` is an example of a nested object. You may define a `_prefix` as a prefix for all columns of the nested object.
139
140
140
141
#### Lists
141
142
142
-
`skills` is an example of a list. You need to set `_listField` and a `_prefix` for all columns of the list. In this example, all columns starting with *Skill* and an increasing number are part of the list, i.e. *Skill 1*, *Skill 2*, etc.
143
+
`skills` is an example of a list. You need to set `_listField` and a `_prefix` for all columns of the list. In this example, all columns starting with _Skill_ and an increasing number are part of the list, i.e. _Skill 1_, _Skill 2_, etc.
Get "active" rows from the Google spreadsheet as an `Observable` of objects or a given type as type variable `T`. You may have an *active* column with name `isActiveColumnName`, with which you can enable or disable rows/entries.
172
+
Get "active" rows from the Google spreadsheet as an `Observable` of objects or a given type as type variable `T`. You may have an _active_ column with name `isActiveColumnName`, with which you can enable or disable rows/entries.
161
173
"Active" rows have the value `true`, `1` or `yes`. You may also define your own `activeValues`.
0 commit comments