PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 2024 → [WB19] Display Excel file received via buffer
[WB19] Display Excel file received via buffer
Débuté par Ericus, 03 aoû. 2015 12:49 - 1 réponse
Posté le 03 août 2015 - 12:49
Hi

I am creating an excel file in a webservice procedure and then returning that Excel file with a buffer variable to my WebDev application user.

I am then trying to display that Excel file using StringDisplay(bufMyResult,"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet ")

However the file cannot be opened with Excel. Even if I add an optional filename parameter to Stringdisplay the user can save the file but it still cannot be opened in Excel.

A separate procedure where a PDF file is returned in a buffer works perfectly.

Any suggestions please?

Thanks in advance


Ericus Steyn
Posté le 03 août 2015 - 14:19
Hi Ericus,

so the excel file you are creating -IS- a xlsx?
Because if it is a xls file, then your mime type is incorrect. See here for details:
http://stackoverflow.com/questions/974079/setting-mime-type-for-excel-document

Best regards