Spaces:
Sleeping
Sleeping
type selection
Browse files
app.py
CHANGED
|
@@ -116,9 +116,14 @@ def download_button(object_to_download, download_filename, button_text, pickle_i
|
|
| 116 |
|
| 117 |
st.markdown(
|
| 118 |
'''
|
| 119 |
-
#
|
|
|
|
| 120 |
Provide any spreadsheet (using a dropbox link) that has a column of revit IDs.
|
|
|
|
|
|
|
| 121 |
Select the sheet witin the spreadsheet and the column with the IDs.
|
|
|
|
|
|
|
| 122 |
Only the selected sheet will be returned, you can cut and paste the sheet back into the origial spreadsheet.
|
| 123 |
'''
|
| 124 |
)
|
|
@@ -139,7 +144,7 @@ if cobie_file_button:
|
|
| 139 |
cobie_file = pd.ExcelFile(cobie_file_path)
|
| 140 |
tabs = cobie_file.sheet_names
|
| 141 |
|
| 142 |
-
|
| 143 |
|
| 144 |
if tabs:
|
| 145 |
selected_sheet = st.selectbox(
|
|
@@ -152,7 +157,27 @@ if tabs:
|
|
| 152 |
if type(df) == pd.DataFrame:
|
| 153 |
|
| 154 |
st.write(df)
|
| 155 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 156 |
# st.markdown(download_button(df, 'COBieIDs.xlsx', 'Download COBieIDs.xlsx'), unsafe_allow_html=True)
|
| 157 |
|
| 158 |
|
|
|
|
| 116 |
|
| 117 |
st.markdown(
|
| 118 |
'''
|
| 119 |
+
# Convert Revit IDs to GUIDs
|
| 120 |
+
|
| 121 |
Provide any spreadsheet (using a dropbox link) that has a column of revit IDs.
|
| 122 |
+
|
| 123 |
+
|
| 124 |
Select the sheet witin the spreadsheet and the column with the IDs.
|
| 125 |
+
|
| 126 |
+
|
| 127 |
Only the selected sheet will be returned, you can cut and paste the sheet back into the origial spreadsheet.
|
| 128 |
'''
|
| 129 |
)
|
|
|
|
| 144 |
cobie_file = pd.ExcelFile(cobie_file_path)
|
| 145 |
tabs = cobie_file.sheet_names
|
| 146 |
|
| 147 |
+
selected_column = None
|
| 148 |
|
| 149 |
if tabs:
|
| 150 |
selected_sheet = st.selectbox(
|
|
|
|
| 157 |
if type(df) == pd.DataFrame:
|
| 158 |
|
| 159 |
st.write(df)
|
| 160 |
+
columns = df.columns
|
| 161 |
+
selected_column = st.selectbox(
|
| 162 |
+
'Select column with revit ids',
|
| 163 |
+
columns,
|
| 164 |
+
)
|
| 165 |
+
|
| 166 |
+
if selected_column:
|
| 167 |
+
|
| 168 |
+
# df['COBieGUID'] = df[selected_column].apply(compress)
|
| 169 |
+
|
| 170 |
+
st.write(df)
|
| 171 |
+
|
| 172 |
+
# st.markdown(
|
| 173 |
+
# download_button(
|
| 174 |
+
# df,
|
| 175 |
+
# 'COBieGUIDs.xlsx',
|
| 176 |
+
# 'Download COBieGUIDs.xlsx',
|
| 177 |
+
# pickle_it=False,
|
| 178 |
+
# ),
|
| 179 |
+
# unsafe_allow_html=True,
|
| 180 |
+
# )
|
| 181 |
# st.markdown(download_button(df, 'COBieIDs.xlsx', 'Download COBieIDs.xlsx'), unsafe_allow_html=True)
|
| 182 |
|
| 183 |
|