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
TextExtractor.supported_extensions no longer includes .png and .gif, while other helper logic still treats image formats as supported. This mismatch can cause uploads that were previously accepted to be skipped or rejected in one path but still appear supported in another.
The Excel extraction path loads every sheet into pandas dataframes and converts them to markdown in memory. Large or multi-sheet spreadsheets may cause high memory usage, long processing times, or oversized extracted documents, so limits and behavior for large files should be validated.
elifextensionin ['.xlsx', '.xls']:
importpandasaspdengine='openpyxl'ifextension=='.xlsx'else'xlrd'try:
xl=pd.ExcelFile(file_path, engine=engine)
exceptException:
xl=pd.ExcelFile(file_path)
sheet_texts= []
forsheet_nameinxl.sheet_names:
df=xl.parse(sheet_name)
ifdf.empty:
continuedf=df.fillna('')
sheet_md=df.to_markdown(index=False)
sheet_texts.append(f"## Sheet: {sheet_name}\n\n{sheet_md}")
return"\n\n".join(sheet_texts) ifsheet_textselse"[Excel file is empty or contains no data]"
CSV files are still read strictly as UTF-8 text. Real-world spreadsheets exported as CSV often use other encodings, so this path may fail for valid uploads even though spreadsheet support was expanded.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added the UI message in case of CSV/XLSX.
XLSX text extraction logic added in the text-extractor file.