Skip to content

Commit a60d8e1

Browse files
committed
support preview for xls and xlsx
1 parent 309126a commit a60d8e1

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

api/types/type_resource.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -154,10 +154,9 @@ def preview_data(self) -> Optional[PreviewData]:
154154
return None
155155

156156
# Check if preview is enabled and if it's a CSV file
157-
if (
158-
not getattr(self, "preview_enabled", False)
159-
or not file_details.format.lower() == "csv"
160-
):
157+
if not getattr(
158+
self, "preview_enabled", False
159+
) or not file_details.format.lower() in ["csv", "xls", "xlsx"]:
161160
return None
162161

163162
# Use a try-except with a timeout to prevent GraphQL query timeouts

0 commit comments

Comments
 (0)