Parse html to text in export_query (#32794)
* fix: Parse html to text in export_query * chore: Use xlsx data for csv content
This commit is contained in:
parent
3efc476da9
commit
aca2801897
1 changed files with 6 additions and 1 deletions
|
|
@ -356,7 +356,12 @@ def export_query():
|
|||
)
|
||||
|
||||
if file_format_type == "CSV":
|
||||
content = get_csv_bytes(xlsx_data, csv_params)
|
||||
from frappe.utils.xlsxutils import handle_html
|
||||
|
||||
content = get_csv_bytes(
|
||||
[[handle_html(frappe.as_unicode(v)) if isinstance(v, str) else v for v in r] for r in xlsx_data],
|
||||
csv_params,
|
||||
)
|
||||
file_extension = "csv"
|
||||
elif file_format_type == "Excel":
|
||||
from frappe.utils.xlsxutils import make_xlsx
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue